Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 49
Default Macro additional information

I have code below that I use to copy range of cells to other tabs that are
inserted by a user. Is there away after this code to have the same macro
change the tab to what is typed in textbox1 for all 10 tabs? Any help would
be appreciated. Thanks


Sub ChangeRequestNumber()
Range("P5:R5").Copy
For sh = 2 To Sheets.Count
If Sheets(sh).Name Like ("Request*") Then
ActiveSheet.Paste Destination:=Sheets(sh).Range("P5:R5")
End If
Next
End Sub

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27
Default Macro additional information

Hi LRay67

You could try something like

For Each C In Range("P5:R5")
Sheets(x).Name = C
Next C

The len for the value in each cell will have to be less than the maximim for
an Excel sheet tab. I think it is 30 depending on your office version.
Also, they cannot use any invalid characters

Thanks,

"LRay67" wrote:

I have code below that I use to copy range of cells to other tabs that are
inserted by a user. Is there away after this code to have the same macro
change the tab to what is typed in textbox1 for all 10 tabs? Any help would
be appreciated. Thanks


Sub ChangeRequestNumber()
Range("P5:R5").Copy
For sh = 2 To Sheets.Count
If Sheets(sh).Name Like ("Request*") Then
ActiveSheet.Paste Destination:=Sheets(sh).Range("P5:R5")
End If
Next
End Sub

Reply
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
How to get additional information rlo Excel Discussion (Misc queries) 4 September 25th 09 09:21 PM
how to save in the excel some additional invisible information Smugliy Excel Programming 3 March 13th 08 09:03 PM
Need your help. I need to add additional information into cells Shani Excel Programming 5 May 4th 06 06:56 PM
Sorting data and retaining additional information with value, not Marie Excel Programming 3 August 27th 04 10:55 PM
Repost for additional information Henry[_6_] Excel Programming 1 May 11th 04 03:35 AM


All times are GMT +1. The time now is 06:09 AM.

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

About Us

"It's about Microsoft Excel"