I am still relatively new to VBA so my question may not be stated with correct words. One of my worksheets is labeled ufd. Is this the correct way to set it up to be able to then refer/use it in code?
The above works fine, but I wondering if the word "set" is correct because I have begun to have some Excel crashing problems and am checking all the little stuff. One of the Excel -type errors is "do not set the value of a microsoft object......." This may have nothing to do with my code above but was checking everything.
So, back to the question: Is the above the correct way to Dim a worksheet, or is there a simpler/better/shorter way?
thanks
Code:
Dim ufd As Worksheet
Set ufd = Sheets("ufd")
The above works fine, but I wondering if the word "set" is correct because I have begun to have some Excel crashing problems and am checking all the little stuff. One of the Excel -type errors is "do not set the value of a microsoft object......." This may have nothing to do with my code above but was checking everything.
So, back to the question: Is the above the correct way to Dim a worksheet, or is there a simpler/better/shorter way?
thanks