A
Alex St-Pierre
Hello,
does anyone know why this is not working...
The Macro1 in file C:\test.xls is existing. When I put the
line Macro1(currentworkbook) in commentary, it open the
file. When not, it makes an error 450 (the number of
argument is not correct or property invalid)
Sub test()
Dim CurrentWorkbook As Workbook
Dim file As String
Dim path As String
path = "C:\"
file = "test.xls"
Set CurrentWorkbook = Application.Workbooks.Open(path
& file)
Macro1 (CurrentWorkbook)
End Sub
does anyone know why this is not working...
The Macro1 in file C:\test.xls is existing. When I put the
line Macro1(currentworkbook) in commentary, it open the
file. When not, it makes an error 450 (the number of
argument is not correct or property invalid)
Sub test()
Dim CurrentWorkbook As Workbook
Dim file As String
Dim path As String
path = "C:\"
file = "test.xls"
Set CurrentWorkbook = Application.Workbooks.Open(path
& file)
Macro1 (CurrentWorkbook)
End Sub