I have run into the problem with ThisWorkbook.Worksheet function. I started doing tutorials by VBAIsFun on youtube and I am running into trouble with this function.
Here is the tutorial that I am having trouble with : Excel VBA Basics #7 - Using specific sheets, Hiding, Unhiding and Selecting with VBA - YouTube
So I got the Run-time error code '9' when I went to run it. I changed all of the Thisworkbook.sheets command to Activeworkbook.sheets command and it worked when I ran it from VBA. I then went and tried to run the code from the excel sheet (Alt+F8) and no macros came up as available to run.
This leads me to believe that there might be some sort of link between the VBA code and the excel sheet that is missing. Any thoughts or suggestions are greatly appreciated.
Thanks
Here is the tutorial that I am having trouble with : Excel VBA Basics #7 - Using specific sheets, Hiding, Unhiding and Selecting with VBA - YouTube
So I got the Run-time error code '9' when I went to run it. I changed all of the Thisworkbook.sheets command to Activeworkbook.sheets command and it worked when I ran it from VBA. I then went and tried to run the code from the excel sheet (Alt+F8) and no macros came up as available to run.
This leads me to believe that there might be some sort of link between the VBA code and the excel sheet that is missing. Any thoughts or suggestions are greatly appreciated.
Thanks