I suspect that this is an elementary question, but I have not had to code an application object in the past. There is a single Workbook open, named Test.xlsm, with a single Worksheet, Sheet1. I would like to use the Application.Run Method to run Excel Macros. is the proper way to specify the Application ojbject for use with the Application.Run method. The macro that I wish to run has no parameters. The code:
Sub CodeRun()
Worksheets("Sheet1").Run (Setval)
End Sub
Sub Setval()
Cells(4, 4).Value = 8
End Sub
gives an "Expected Function or Variable" error.
Thanks.
Sub CodeRun()
Worksheets("Sheet1").Run (Setval)
End Sub
Sub Setval()
Cells(4, 4).Value = 8
End Sub
gives an "Expected Function or Variable" error.
Test.xlsm | |||
---|---|---|---|
D | |||
4 | |||
Sheet1 |
Thanks.