G
Guest
I am currently writing code that opens a second workbook to pull infomration
from it. One of my subroutines is used by multiple buttons and sometimes the
subroutine needs to work on the sheet with the button, and sometimes it needs
to work on the opened workbook.
I have a public variable (MySheet) declared so I can set the WB i want, but
sometimes that variable is already filled when this subroutine activates, and
sometimes it needs to be filled.
I've tried things like if isempty(mysheet) or if mysheet = nothing and can't
seem to find a way to determine if mysheet is set or not, without the code
erroring. Anysuggestions on how to check to see if the variable is set or
not? Thanks.
from it. One of my subroutines is used by multiple buttons and sometimes the
subroutine needs to work on the sheet with the button, and sometimes it needs
to work on the opened workbook.
I have a public variable (MySheet) declared so I can set the WB i want, but
sometimes that variable is already filled when this subroutine activates, and
sometimes it needs to be filled.
I've tried things like if isempty(mysheet) or if mysheet = nothing and can't
seem to find a way to determine if mysheet is set or not, without the code
erroring. Anysuggestions on how to check to see if the variable is set or
not? Thanks.