I'm writing a macro (macro A, WrapUp) to, among other things, run a macro (macro B, Browse_Print_Start) from a different sheet. Macro B is on a protected worksheet that I do not have the password for, but runs fine as a standalone. I can open the worksheet for Macro B, enter my variables, and click a button on the sheet to run the macro. However, when I try to call macro B from macro A, I get a "1004" error. Some of the code that I am trying to use to run this (irrelevant code removed):
Sub WrapUp()
FundName = Range("A4")
GainLossPages = Range("D4")
AppraisalPages = Range("E4")
RunDate = Range("B4")
RunExtract
End Sub
Sub RunExtract()
Application.DisplayAlerts = False
Workbooks.Open "1777_CMOD_Extract_Flexible(1) Custom for PWC Wrapup.xls"
Application.DisplayAlerts = True
Sheets("Flex Request Table").Select
Range("F10").Value = FundName
Range("F11").Value = FundName
Range("H10").Value = RunDate
Range("H11").Value = RunDate
Range("X10").Value = GainLossPages
Range("X11").Value = AppraisalPages
Application.Run "Browse_Print_Start"
'Call "1777_CMOD_Extract_Flexible(1) Custom for PWC Wrapup.xls!Browse_Print_Start"
'Application.Run "1777_CMOD_Extract_Flexible(1) Custom for PWC Wrapup!Browse_Print_Start"
'Application.Run ("Browse_Print_Start")
'"1777_CMOD_Extract_Flexible(1) Custom for PWC Wrapup.xls'!Extract_CMOD"
End Sub
I've also shown some of the other things I've tried that are now commented out. Anyone have any suggestions or workarounds for this? Thanks
Sub WrapUp()
FundName = Range("A4")
GainLossPages = Range("D4")
AppraisalPages = Range("E4")
RunDate = Range("B4")
RunExtract
End Sub
Sub RunExtract()
Application.DisplayAlerts = False
Workbooks.Open "1777_CMOD_Extract_Flexible(1) Custom for PWC Wrapup.xls"
Application.DisplayAlerts = True
Sheets("Flex Request Table").Select
Range("F10").Value = FundName
Range("F11").Value = FundName
Range("H10").Value = RunDate
Range("H11").Value = RunDate
Range("X10").Value = GainLossPages
Range("X11").Value = AppraisalPages
Application.Run "Browse_Print_Start"
'Call "1777_CMOD_Extract_Flexible(1) Custom for PWC Wrapup.xls!Browse_Print_Start"
'Application.Run "1777_CMOD_Extract_Flexible(1) Custom for PWC Wrapup!Browse_Print_Start"
'Application.Run ("Browse_Print_Start")
'"1777_CMOD_Extract_Flexible(1) Custom for PWC Wrapup.xls'!Extract_CMOD"
End Sub
I've also shown some of the other things I've tried that are now commented out. Anyone have any suggestions or workarounds for this? Thanks