object variable or with block variable not set mean

G

Guest

What does object variable or with block variable not set
really mean?
I have the statement coded as thus:

This part declared in declarations:
Public ThsWrkBk As Workbook

This part executed in a Public Static procedure:
Dim ThsWrkBk
Set ThsWrkBk = ActiveWorkbook

This part executed in a Public procedure using
Public PostPymnt(ThsWrkBk, ShtNme)
ThsWrkBk.Active
 
G

Guest

Thanks Norman it worked

Norman Jones said:
Hi Rick,

It would be better if you were to post the actual code.

However, perhaps, try deleting:


and try changing:
 
G

Guest

Yo are redifining ThsWrkBk with local scope, and this will take precedence
over the one you defined in your declarations. Dont (re)dim it in the proc.
 

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