How do you capture the name of the current worksheet in VBA?
Ok, I finally got it to work.
I first tried
Set wsht = wbk.Worksheets(ActiveSheet.Name)
and that didn't work.
So then I assigned ActiveSheet.Name to a string variable
strActiveWorksheet = ActiveSheet.Name
and then usd the variable in the expression
Set wsht = wbk.Worksheets(strActiveWorksheet)
and it worked.
Thanks for providing me with the solution, Kevin.
Paul
|