|
-
Jun 22nd, 2006, 08:42 AM
#1
Thread Starter
Junior Member
[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
-
Jun 22nd, 2006, 08:50 AM
#2
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
-
Jun 22nd, 2006, 08:54 AM
#3
Thread Starter
Junior Member
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
-
Jun 22nd, 2006, 09:04 AM
#4
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
-
Jun 22nd, 2006, 09:27 AM
#5
Thread Starter
Junior Member
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
-
Jun 22nd, 2006, 10:03 AM
#6
Re: Package Deployment Wizard
Try these changes (additions and changes in red, deletions in green):
VB Code:
Private Sub Form_Load()
[COLOR=Red]Dim intInterval [COLOR=Red]As[/COLOR] Integer[/COLOR][COLOR=Red], blGotInterval [COLOR=Red]As[/COLOR] Boolean[/COLOR]
'Dim msg As Variant
'Dim folder As String
'Load Me [COLOR=green]'<- if the form isn't loaded this isn't going to run
'IOW, there's no reason for this line[/COLOR]
[COLOR=Green]'GoTos are bad programming practice[/COLOR] start:
Do
intInterval = InputBox("Enter a number (5,10,20,30)", "Setting Interval", 30)
[color=red]Select [/color][COLOR=Red]Case[/COLOR][color=red] intInterval[/color]
[COLOR=Red]Case 5, 10, 20, 30[/color]
[COLOR=Red]blGotInterval = [/COLOR][COLOR=Red]True[/COLOR]
[COLOR=Red]Exit Do[/COLOR]
'[COLOR=Green]If intInterval <> 5 And intInterval <> 10 And intInterval <> 20 And _
intInterval <> 30 Then[/COLOR]
[color=red]Case Else[/color]
[COLOR=Red]MsgBox "Error:Invalid number", vbExclamation, "Try again" [/COLOR]
[color=red]End Select[/color]
'GoTo start
'End If
[COLOR=red]Loop [COLOR=Red]While[/COLOR] not blGotInterval[/COLOR]
lblPop.Caption = "Last occurance of timer pop (" & intInterval & " mins)"
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
-
Jun 22nd, 2006, 07:46 PM
#7
Thread Starter
Junior Member
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
-
Jun 23rd, 2006, 02:52 PM
#8
Thread Starter
Junior Member
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.
-
Jun 23rd, 2006, 04:41 PM
#9
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
-
Jun 23rd, 2006, 09:22 PM
#10
Re: Package Deployment Wizard
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 Posts • VS.NET on Vista • Multiple .NET Framework Versions • Office Primary Interop Assemblies • VB/Office Guru™ Word SpellChecker™.NET • VB/Office Guru™ Word SpellChecker™ VB6 • VB.NET Attributes Ex. • Outlook Global Address List • API 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 
-
Jun 23rd, 2006, 10:44 PM
#11
PowerPoster
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)"
-
Jun 24th, 2006, 12:58 AM
#12
Re: Package Deployment Wizard
You may not be deploying all the dependency files...
-
Jun 26th, 2006, 09:45 AM
#13
Thread Starter
Junior Member
Re: Package Deployment Wizard
 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
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|