Results 1 to 13 of 13

Thread: [RESOLVED] Package Deployment Wizard

  1. #1

    Thread Starter
    Junior Member
    Join Date
    May 2006
    Location
    Minneapolis, Mn
    Posts
    16

    Resolved [RESOLVED] Package Deployment Wizard

    I have a small application that when deployed using the Wizard gives a divide by zero just as the install application starts. It runs fine from the IDE, however.

    *scratching head*

    Any ideas??

    Michael

  2. #2
    Shared Member
    Join Date
    May 2005
    Location
    Kashmir, India
    Posts
    2,277

    Re: Package Deployment Wizard

    Have you tried it using Inno. I have seen that Inno works better than PDW. Take a look at www.jrsoftware.com.

    Coming to your problem, where exactly does it start giving the error? Is it during the wizard, or at the end or while you are installing the application.
    Use [code] source code here[/code] tags when you post source code.

    My Articles

  3. #3

    Thread Starter
    Junior Member
    Join Date
    May 2006
    Location
    Minneapolis, Mn
    Posts
    16

    Re: Package Deployment Wizard

    It gives the error just as I run the program.... the first thing the program does is popup an inputbox and it gives the error when that pops up.....

    I looked at inno but it seemed to be totally confusing...... oh well

    Michael

  4. #4
    Shared Member
    Join Date
    May 2005
    Location
    Kashmir, India
    Posts
    2,277

    Re: Package Deployment Wizard

    Can you post the code? I guess it is not a problem with PDW now, seems like the code is doing something that makes it throw an error.
    Use [code] source code here[/code] tags when you post source code.

    My Articles

  5. #5

    Thread Starter
    Junior Member
    Join Date
    May 2006
    Location
    Minneapolis, Mn
    Posts
    16

    Re: Package Deployment Wizard

    here is the code.... as long as you don't critique it lol


    Private Sub Form_Load()
    Dim msg As Variant
    Dim folder As String
    Load Me

    start:
    intInterval = InputBox("Enter a number (5,10,20,30)", "Setting Interval", 30)
    If intInterval <> 5 And intInterval <> 10 And intInterval <> 20 And _
    intInterval <> 30 Then
    msg = MsgBox("Error:Invalid number", vbExclamation, "Try again")
    GoTo start
    End If
    lblPop.Caption = "Last occurance of timer pop (" & intInterval & " mins)"

    End Sub

  6. #6
    PowerPoster
    Join Date
    Feb 2006
    Location
    East of NYC, USA
    Posts
    5,691

    Re: Package Deployment Wizard

    Try these changes (additions and changes in red, deletions in green):
    VB Code:
    1. Private Sub Form_Load()
    2. [COLOR=Red]Dim intInterval [COLOR=Red]As[/COLOR] Integer[/COLOR][COLOR=Red], blGotInterval [COLOR=Red]As[/COLOR] Boolean[/COLOR]
    3. 'Dim msg As Variant
    4. 'Dim folder As String
    5. 'Load Me [COLOR=green]'<- if the form isn't loaded this isn't going to run
    6. 'IOW, there's no reason for this line[/COLOR]
    7.  
    8. [COLOR=Green]'GoTos are bad programming practice[/COLOR] start:
    9.   Do
    10.     intInterval = InputBox("Enter a number (5,10,20,30)", "Setting Interval", 30)
    11.     [color=red]Select [/color][COLOR=Red]Case[/COLOR][color=red] intInterval[/color]
    12.       [COLOR=Red]Case 5, 10, 20, 30[/color]
    13.         [COLOR=Red]blGotInterval = [/COLOR][COLOR=Red]True[/COLOR]
    14.         [COLOR=Red]Exit Do[/COLOR]
    15.     '[COLOR=Green]If intInterval <> 5 And intInterval <> 10 And intInterval <> 20 And _
    16.         intInterval <> 30 Then[/COLOR]
    17.     [color=red]Case Else[/color]
    18.         [COLOR=Red]MsgBox "Error:Invalid number", vbExclamation, "Try again" [/COLOR]
    19.     [color=red]End Select[/color]
    20.         'GoTo start
    21.     'End If
    22.   [COLOR=red]Loop [COLOR=Red]While[/COLOR] not blGotInterval[/COLOR]
    23. lblPop.Caption = "Last occurance of timer pop (" & intInterval & " mins)"
    24.  
    25. End Sub
    The most difficult part of developing a program is understanding the problem.
    The second most difficult part is deciding how you're going to solve the problem.
    Actually writing the program (translating your solution into some computer language) is the easiest part.

    Please indent your code and use [HIGHLIGHT="VB"] [/HIGHLIGHT] tags around it to make it easier to read.

    Please Help Us To Save Ana

  7. #7

    Thread Starter
    Junior Member
    Join Date
    May 2006
    Location
    Minneapolis, Mn
    Posts
    16

    Re: Package Deployment Wizard

    Very nice.... thank you for the code corrections. I usually do not use go to's but I didn't take the time to do it right.....

    Again, thanks.... this code runs, now to see if it deploys correctly

    Michael

  8. #8

    Thread Starter
    Junior Member
    Join Date
    May 2006
    Location
    Minneapolis, Mn
    Posts
    16

    Unhappy Re: Package Deployment Wizard

    I still get a divide by zero just as the application initiates, even with making the code changes suggested.

    Any ideas????

    Run time error (11).... divide by zero.

  9. #9
    PowerPoster
    Join Date
    Feb 2006
    Location
    East of NYC, USA
    Posts
    5,691

    Re: Package Deployment Wizard

    Move the code to the Form_Activate event.
    The most difficult part of developing a program is understanding the problem.
    The second most difficult part is deciding how you're going to solve the problem.
    Actually writing the program (translating your solution into some computer language) is the easiest part.

    Please indent your code and use [HIGHLIGHT="VB"] [/HIGHLIGHT] tags around it to make it easier to read.

    Please Help Us To Save Ana

  10. #10
    Ex-Super Mod RobDog888's Avatar
    Join Date
    Apr 2001
    Location
    LA, Calif. Raiders #1 AKA:Gangsta Yoda™
    Posts
    60,709

    Re: Package Deployment Wizard

    Moved
    VB/Office Guru™ (AKA: Gangsta Yoda®)
    I dont answer coding questions via PM. Please post a thread in the appropriate forum.

    Microsoft MVP 2006-2011
    Office Development FAQ (C#, VB.NET, VB 6, VBA)
    Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
    If a post has helped you then Please Rate it!
    Reps & Rating PostsVS.NET on Vista Multiple .NET Framework Versions Office Primary Interop AssembliesVB/Office Guru™ Word SpellChecker™.NETVB/Office Guru™ Word SpellChecker™ VB6VB.NET Attributes Ex.Outlook Global Address ListAPI Viewer utility.NET API Viewer Utility
    System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6

  11. #11
    PowerPoster
    Join Date
    May 2006
    Posts
    2,988

    Re: Package Deployment Wizard

    change this to a message box for now .. or comment it out, and see what it does once installed ..

    lblPop.Caption = "Last occurance of timer pop (" & intInterval & " mins)"

  12. #12
    Banned randem's Avatar
    Join Date
    Oct 2002
    Location
    Maui, Hawaii
    Posts
    11,385

    Re: Package Deployment Wizard

    You may not be deploying all the dependency files...

  13. #13

    Thread Starter
    Junior Member
    Join Date
    May 2006
    Location
    Minneapolis, Mn
    Posts
    16

    Resolved Re: Package Deployment Wizard

    Quote Originally Posted by rory
    change this to a message box for now .. or comment it out, and see what it does once installed ..

    lblPop.Caption = "Last occurance of timer pop (" & intInterval & " mins)"
    I deleted the whole inputbox portion of the code and it works fine, having a hard coded value in it. That is what I get for trying to put in a little flexibility

    Michael
    Last edited by mikevba; Jun 26th, 2006 at 11:09 AM.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width