gheyman
Well-known Member
- Joined
- Nov 14, 2005
- Messages
- 2,347
- Office Version
- 365
- Platform
- Windows
I have 5 macro's (not sure if thats the technically correct word to use) that I am trying to run all of them from one button.
So I created this:
If I run these individually they work with no issues, but when I combined them (see above) I get the ambiguous error message. Any help is appreciated.
here is the one macro that it doesnt like when its combined with the other. But stand-alone it works fine
So I created this:
Code:
Sub Import_PP_Report()
RemoveTab
GetCMCS
ClearMakeTable
AddTitleFormulas
Refresh_All_tables
End Sub
If I run these individually they work with no issues, but when I combined them (see above) I get the ambiguous error message. Any help is appreciated.
here is the one macro that it doesnt like when its combined with the other. But stand-alone it works fine
Code:
Sub GetCMCS()
Dim ProposalReports As Workbook
Dim CMCS As Variant
Set ProposalReports = ThisWorkbook
CMCS = Application.GetOpenFilename("Excel files (*.xls*), *.xls*")
If CMCS <> False Then
Workbooks.Open (CMCS)
Set CMCS = ActiveWorkbook
If Evaluate("isref('Material Ad Hoc'!A1)") Then
Sheets("Material Ad Hoc").Select
Sheets("Material Ad Hoc").Copy Before:=ThisWorkbook.Sheets(2)
Sheets("Material Ad Hoc").Select
With ActiveWorkbook.Sheets("Material Ad Hoc").Tab
.Color = 12611584
.TintAndShade = 0
End With
Else
MsgBox "The Selected Workbook does not contain a Material Ad Hoc tab, check to validate the tab is named correctly or select a different Workbook"
Exit Sub
End If
End If
End Sub