Today I ran into the Run-time error -21473219767 (80028029)
Automation error. Invalid forward reference, or reference to uncompiled type.
Like others, I had been running my code for years without issue. Today, it decided to not function as it had before. After reading a bit from other posts, I was curious if the fix was simpler? But, I’m not sure if I’m opening my code up to other issues.
Prior to this error, the sheet tab name was “Data”, the actual name in the properties was Sheet2.
The line that the error occurred on was Sheets("Data").Select
What I did: in VBA; edited the properties of the sheet in question from (name) = Sheet2 to (name) = dataSheet.
Then, used the line dataSheet.Select in place of Sheets("Data").Select
This worked... but, what potential issues might I be presenting? Best practices, thoughts, ideas are much appreciated.
For reference: Help with new Run-Time Error PLEASE!!
The fix was to declare the sheet as a variable (As Worksheet).
(Help with new Run-Time Error PLEASE!!)
Automation error. Invalid forward reference, or reference to uncompiled type.
Like others, I had been running my code for years without issue. Today, it decided to not function as it had before. After reading a bit from other posts, I was curious if the fix was simpler? But, I’m not sure if I’m opening my code up to other issues.
Prior to this error, the sheet tab name was “Data”, the actual name in the properties was Sheet2.
The line that the error occurred on was Sheets("Data").Select
What I did: in VBA; edited the properties of the sheet in question from (name) = Sheet2 to (name) = dataSheet.
Then, used the line dataSheet.Select in place of Sheets("Data").Select
This worked... but, what potential issues might I be presenting? Best practices, thoughts, ideas are much appreciated.
For reference: Help with new Run-Time Error PLEASE!!
The fix was to declare the sheet as a variable (As Worksheet).
(Help with new Run-Time Error PLEASE!!)