Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 9
Default Insert new sheet

Hi!
Is there some code to insert a new sheet with the contents of the
selected cell?
Tank you
Horacio
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 41
Default Insert new sheet

Try following:

Sub InsertSheet()
ActRow = Selection.Row
ActCol = Selection.Column
ActSheetName = ActiveSheet.Name
ActiveWorkbook.Sheets.Add After:=Worksheets(Worksheets.Count)
Cells(ActRow, ActCol).Value = Sheets(ActSheetName).Cells(ActRow,
ActCol).Value
End Sub

Regards
reklamo

"Horacio" wrote:

Hi!
Is there some code to insert a new sheet with the contents of the
selected cell?
Tank you
Horacio

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 9
Default Insert new sheet

Sorry
May I´m not have been well explained.
What we seek is a code that do the following:
In sheet 1 wen I select the cell A1 contains "Test", I want the code
insert a new sheet with the name "Test"
Regards
Horacio

reklamo escreveu:
Try following:

Sub InsertSheet()
ActRow = Selection.Row
ActCol = Selection.Column
ActSheetName = ActiveSheet.Name
ActiveWorkbook.Sheets.Add After:=Worksheets(Worksheets.Count)
Cells(ActRow, ActCol).Value = Sheets(ActSheetName).Cells(ActRow,
ActCol).Value
End Sub

Regards
reklamo

"Horacio" wrote:

Hi!
Is there some code to insert a new sheet with the contents of the
selected cell?
Tank you
Horacio

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 41
Default Insert new sheet

Hi Horacio

Try following code:
Sub InsertSheet()
NewSheetName = Selection.Value
ActiveWorkbook.Sheets.Add After:=Worksheets(Worksheets.Count)
ActiveSheet.Name = NewSheetName
End Sub

Regards
reklamo


"Horacio" wrote:

Sorry
May I´m not have been well explained.
What we seek is a code that do the following:
In sheet 1 wen I select the cell A1 contains "Test", I want the code
insert a new sheet with the name "Test"
Regards
Horacio

reklamo escreveu:
Try following:

Sub InsertSheet()
ActRow = Selection.Row
ActCol = Selection.Column
ActSheetName = ActiveSheet.Name
ActiveWorkbook.Sheets.Add After:=Worksheets(Worksheets.Count)
Cells(ActRow, ActCol).Value = Sheets(ActSheetName).Cells(ActRow,
ActCol).Value
End Sub

Regards
reklamo

"Horacio" wrote:

Hi!
Is there some code to insert a new sheet with the contents of the
selected cell?
Tank you
Horacio


  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 9
Default Insert new sheet

Hi Reklamo!
Thank you, the code is perfect.
Regards
Horacio

reklamo escreveu:
Hi Horacio

Try following code:
Sub InsertSheet()
NewSheetName = Selection.Value
ActiveWorkbook.Sheets.Add After:=Worksheets(Worksheets.Count)
ActiveSheet.Name = NewSheetName
End Sub

Regards
reklamo


"Horacio" wrote:

Sorry
May I´m not have been well explained.
What we seek is a code that do the following:
In sheet 1 wen I select the cell A1 contains "Test", I want the code
insert a new sheet with the name "Test"
Regards
Horacio

reklamo escreveu:
Try following:

Sub InsertSheet()
ActRow = Selection.Row
ActCol = Selection.Column
ActSheetName = ActiveSheet.Name
ActiveWorkbook.Sheets.Add After:=Worksheets(Worksheets.Count)
Cells(ActRow, ActCol).Value = Sheets(ActSheetName).Cells(ActRow,
ActCol).Value
End Sub

Regards
reklamo

"Horacio" wrote:

Hi!
Is there some code to insert a new sheet with the contents of the
selected cell?
Tank you
Horacio

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
insert sheet tab is not functioning and can't add new sheet LoLo Excel Worksheet Functions 5 April 2nd 23 07:06 PM
Insert New Sheet De-activates Current Sheet VBA Workaround? facmanboss Excel Programming 5 July 31st 08 08:00 PM
Insert new Worksheet with name, and insert the sheet into itsalphabetical / numerical location S Davis Excel Programming 0 May 12th 08 07:13 PM
insert query into excell sheet to update excell sheet and pivot table vbsolo Excel Discussion (Misc queries) 0 August 24th 05 12:41 PM
Inserting a row in sheet A should Insert a row in sheet B, removing a row in Sheet A should remove the corresponding row in sheet B Hannes Heckner Excel Programming 1 March 5th 04 09:10 AM


All times are GMT +1. The time now is 05:43 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"