LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 343
Default Problem renaming worksheet

The code below is intended to change the name of the Active Worksheet to the
Value in cell A4. But I get an "object or With variable not set"




Private Sub Worksheet_Change(ByVal Target As Range)

Dim Sh As Worksheet

If Target.Address = "$A$4" Then
Const sStr As String = "A4"


ActiveSheet.Name = Sh.Range(sStr).Value


End If

End Sub

 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Problem with renaming work sheet name D Moonn Excel Discussion (Misc queries) 2 April 19th 09 12:21 PM
Problem renaming a worksheet tab nywelton Excel Discussion (Misc queries) 3 July 13th 06 05:25 PM
Problem renaming worksheets ArenaNinja Excel Discussion (Misc queries) 1 April 19th 06 02:40 AM
renaming problem CAMBUSBOY Excel Worksheet Functions 0 May 31st 05 09:01 AM
Workbook crashes after renaming a worksheet - References problem? BenD[_2_] Excel Programming 0 April 21st 04 01:22 AM


All times are GMT +1. The time now is 01:40 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"