Alex Gordon
Alex Gordon

Reputation: 60771

vba: object variable or with block variable not set

i am doing this:

MsgBox ActiveWorkbook.Name

and getting the above mentioned error.

please note that this has worked for many months and now all of a sudden it does not workl

what can i do to fix it?

Upvotes: 0

Views: 587

Answers (1)

MarkJ
MarkJ

Reputation: 30408

Perhaps no workbook is active at all? Is your code running from a hidden workbook, like the personal workbook?

Upvotes: 2

Related Questions