Sheet1 is named Graph and contains some code:
In Module1, I have the following:
Why is it in the above, calling the subroutine using the variable wks does not work?
Thanks
Code:
Sub MyWorksheetCode
' just some code
End Sub
In Module1, I have the following:
Code:
Sub MyModuleCode
Dim wks as Worksheet
Set wks = Worksheets("Graph")
' Call wks.MyWorksheetCode <- This does not work
Call Sheet1.MyWorksheetCode
End Sub
Why is it in the above, calling the subroutine using the variable wks does not work?
Thanks
Last edited: