object variable or with block variable not set mean

  • Thread starter Thread starter Guest
  • Start date Start date
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
 
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:
 
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.
 
Back
Top