Hi,
I have a worksheet that was created in Excel 2000 which has several macros and works well in this environment. However, they have upgraded to Excel 2007 and the worksheet no longer runs correctly without any intervention. If I manually step-thru the macros, the worksheet runs OK. But I have to manually step over a SUB to jump to the next SUB and complete the process.
Not sure what is keeping the macros from continuing to run through all the macros as programmed.
Here is part of the program that I am having issues with....
Sub start_collection()
Application.ScreenUpdating = False
Application.DisplayAlerts = False
'Run ("menu_control")
Application.WindowState = xlMinimized
Open "c:\excel\savestatus.txt" For Input As #1
Line Input #1, spreadsave
Line Input #1, reportprint
Line Input #1, rollspecprint
Close #1
Application.StatusBar = "Start Data Collection"
Worksheets("scanupdate").OnData = "fivesecondscandelay"
Sheets("Input").Select
previous_roll = Range("B2").Value
current_roll = previous_roll
previous_length = Range("D2").Value
current_length = previous_length
Sheets("Roll Data").Select
End Sub
Sub getscandata()
Application.ScreenUpdating = False
Application.DisplayAlerts = False
current_sheet = ActiveSheet.Name
Sheets("Input").Select
current_roll = Range("B2").Value
scan_count = Range("B4").Value
If current_roll <> previous_roll Then
Call loadeorprogress
Application.StatusBar = "Getting Scan Data " & TimeValue(Now)
previous_roll = current_roll
Else
....The only macro that runs is the first one (start_collection) and never continues on to "getscandata", as it was programmed to.
Also, I would like to automatically run the "start_collection" macro upon opening the worksheet and I have tried implementing the following and need to confirm it is correct:
Sub Autpen()
Application.DisplayAlerts = False
start_collection
ThisWorkbook.Saved = True
End Sub
Thanks for the help!!
I have a worksheet that was created in Excel 2000 which has several macros and works well in this environment. However, they have upgraded to Excel 2007 and the worksheet no longer runs correctly without any intervention. If I manually step-thru the macros, the worksheet runs OK. But I have to manually step over a SUB to jump to the next SUB and complete the process.
Not sure what is keeping the macros from continuing to run through all the macros as programmed.
Here is part of the program that I am having issues with....
Sub start_collection()
Application.ScreenUpdating = False
Application.DisplayAlerts = False
'Run ("menu_control")
Application.WindowState = xlMinimized
Open "c:\excel\savestatus.txt" For Input As #1
Line Input #1, spreadsave
Line Input #1, reportprint
Line Input #1, rollspecprint
Close #1
Application.StatusBar = "Start Data Collection"
Worksheets("scanupdate").OnData = "fivesecondscandelay"
Sheets("Input").Select
previous_roll = Range("B2").Value
current_roll = previous_roll
previous_length = Range("D2").Value
current_length = previous_length
Sheets("Roll Data").Select
End Sub
Sub getscandata()
Application.ScreenUpdating = False
Application.DisplayAlerts = False
current_sheet = ActiveSheet.Name
Sheets("Input").Select
current_roll = Range("B2").Value
scan_count = Range("B4").Value
If current_roll <> previous_roll Then
Call loadeorprogress
Application.StatusBar = "Getting Scan Data " & TimeValue(Now)
previous_roll = current_roll
Else
....The only macro that runs is the first one (start_collection) and never continues on to "getscandata", as it was programmed to.
Also, I would like to automatically run the "start_collection" macro upon opening the worksheet and I have tried implementing the following and need to confirm it is correct:
Sub Autpen()
Application.DisplayAlerts = False
start_collection
ThisWorkbook.Saved = True
End Sub
Thanks for the help!!