Two questions:
#1 - this code is in the Workbook's code module, right?
#2 - What is in cell B9?
If B9 is empty you can get an error (I actually get 1004), but... knowing
what's in B9 will help.
What is it you are attempting to do here? I realize you're trying to set
the sheet's tab name to the right 4 characters of cell B9, but I'm curious as
to why it is attached to the _SheetCalculate function, which could result in
it running quite often.
"Tivpine" wrote:
Hi,
Can anyone help? i have this code
Private Sub Workbook_SheetCalculate(ByVal Sh As Object)
Sh.Name = Right(Sh.Range("B9"), 4)
End Sub
But it is giving me this error message
Error Number:- 91
Error:= Object Variable or With block variable not set
Thanks Guys i know i can always count on you.
Cheers
----------------
This post is a suggestion for Microsoft, and Microsoft responds to the
suggestions with the most votes. To vote for this suggestion, click the "I
Agree" button in the message pane. If you do not see the button, follow this
link to open the suggestion in the Microsoft Web-based Newsreader and then
click "I Agree" in the message pane.
http://www.microsoft.com/office/comm...lic.excel.misc