Message 1 of 2
Run-time error '6' : Overflow

Not applicable
01-27-2010
04:52 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hi I have the following code and it's giving me the error: Run-time error '6' : Overflow in the line starting with LCCShell2. The strange thing is that it works when the commandbutton is clicked the first and second time, but not on the third time, when the error is given. After that (i.e. 4th time, 5th time etc) it also works (Note: the program still continues after error is given) . Does anyone have a clue of what may be the problem? Because I don't....thanks a lot.
Private Sub ViewLCCsCommandButton1_Click()
Dim LCCShell2 As String
Call AppendToABatchFile("C:\Users\AAAAAA\Desktop\CCCCCCC\LCCbatchfile2.bat", DrawingName & ".htm")
LCCShell2 = Shell("C:\Users\AAAAAA\Desktop\CCCCCCC\LCCbatchfile2.bat", vbMaximizedFocus)
End Sub Edited by: maltaCAD on Jan 27, 2010 12:52 PM
Private Sub ViewLCCsCommandButton1_Click()
Dim LCCShell2 As String
Call AppendToABatchFile("C:\Users\AAAAAA\Desktop\CCCCCCC\LCCbatchfile2.bat", DrawingName & ".htm")
LCCShell2 = Shell("C:\Users\AAAAAA\Desktop\CCCCCCC\LCCbatchfile2.bat", vbMaximizedFocus)
End Sub Edited by: maltaCAD on Jan 27, 2010 12:52 PM