How to assign a worksheet in VBA

Z

zigzagdna

Subject: How to assign a worksheet in VBA
I have declared following:
Dim wsDec As Worksheet

Now I am doing this
Set wsDec = ActiveWorkbook.wsDecoupling

Where wsDecoubling is a worksheet in my workbook, but I get an error
Object does not support this property or method, what is the correct way to refer to a sheet in a wokbook in VBA.

Thanks,
 
Z

zigzagdna

Subject: How to assign a worksheet in VBA I have declared following: Dim wsDec As Worksheet Now I am doing this Set wsDec = ActiveWorkbook.wsDecoupling Where wsDecoubling is a worksheet in my workbook, but I get an error Object does not support this property or method, what is the correct way torefer to a sheet in a wokbook in VBA. Thanks,

Ben:
Thanks a lot for answering my naive quetsions. Really appreciate your help.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top