View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.misc
Jacob Skaria Jacob Skaria is offline
external usenet poster
 
Posts: 8,520
Default Macro - Auto - Sheet Name change ? expiry

To trigger a macro for change.

Use the below event. Launch VBE using Alt+F11. Insert Module. Double click
sheet1 in treeview, drop down to see the below event. You can use the same
event in 'Thisworkbook' to trigger this from anysheet in the workbook..

Private Sub Worksheet_Change(ByVal Target As Range)

End Sub

If this post helps click Yes
--------------
Jacob Skaria


"Som" wrote:

1 . I want to change sheet name automatically by running macro (VB code)

if sheet name = x

then sheet name will be changed to y after openning the file automatically.

can u pls give me the code?

--------------------------------------------------------
2.
if i want to trigger a macro on any change in sheet 1, what is the code?