Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Script entry to add a new worksheet
Hi, Could some kind person/people offer both specific and generic help with Worksheet properties and events in script, but also specific help with Moving from one worksheet to another, renaming worksheets tags and adding a named worksheet. I am a novice to Excel Scripting, although quite experienced with spreadsheets since Lotus 123 (DOS). -- Knowledge when shared becomes a gift. Thank you for your bounty. |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Script entry to add a new worksheet
Set the Security level to low/medium in (Tools|Macro|Security). From workbook launch VBE using short-key Alt+F11. From menu 'Insert' a module and paste the below code. Save. Get back to Workbook. Run macro from Tools|Macro|Run <selected macro().. Sub AddNewWorksheet() Dim ws As Worksheet Set ws = ActiveWorkbook.Sheets.Add(After:=ActiveSheet) ws.Name = "NewName" End Sub Sub LoopthroughSheets() For Each wsTemp In ActiveWorkbook.Sheets MsgBox wsTemp.Name wsTemp.Name = wsTemp.Name & "New" Next End Sub If this post helps click Yes --------------- Jacob Skaria "oshanter" wrote: Hi, Could some kind person/people offer both specific and generic help with Worksheet properties and events in script, but also specific help with Moving from one worksheet to another, renaming worksheets tags and adding a named worksheet. I am a novice to Excel Scripting, although quite experienced with spreadsheets since Lotus 123 (DOS). -- Knowledge when shared becomes a gift. Thank you for your bounty. |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Script entry to add a new worksheet
Try the below 2 macros Set the Security level to low/medium in (Tools|Macro|Security). From workbook launch VBE using short-key Alt+F11. From menu 'Insert' a module and paste the below code. Save. Get back to Workbook. Run macro from Tools|Macro|Run <selected macro() Sub InserNewSheet() Dim ws As Worksheet Set ws = ActiveWorkbook.Sheets.Add(After:=ActiveSheet) ws.Name = "NewName" End Sub Sub LoopThroughSheets() For Each wsTemp In ActiveWorkbook.Sheets MsgBox wsTemp.Name wsTemp.Name = wsTemp.Name & "New" Next End Sub -- If this post helps click Yes --------------- Jacob Skaria "oshanter" wrote: Hi, Could some kind person/people offer both specific and generic help with Worksheet properties and events in script, but also specific help with Moving from one worksheet to another, renaming worksheets tags and adding a named worksheet. I am a novice to Excel Scripting, although quite experienced with spreadsheets since Lotus 123 (DOS). -- Knowledge when shared becomes a gift. Thank you for your bounty. |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
Script entry to add a new worksheet
Jacob, Thank you. Tom -- Knowledge shared is a gift. Thanks for your gift to me. "Jacob Skaria" wrote: Try the below 2 macros Set the Security level to low/medium in (Tools|Macro|Security). From workbook launch VBE using short-key Alt+F11. From menu 'Insert' a module and paste the below code. Save. Get back to Workbook. Run macro from Tools|Macro|Run <selected macro() Sub InserNewSheet() Dim ws As Worksheet Set ws = ActiveWorkbook.Sheets.Add(After:=ActiveSheet) ws.Name = "NewName" End Sub Sub LoopThroughSheets() For Each wsTemp In ActiveWorkbook.Sheets MsgBox wsTemp.Name wsTemp.Name = wsTemp.Name & "New" Next End Sub -- If this post helps click Yes --------------- Jacob Skaria "oshanter" wrote: Hi, Could some kind person/people offer both specific and generic help with Worksheet properties and events in script, but also specific help with Moving from one worksheet to another, renaming worksheets tags and adding a named worksheet. I am a novice to Excel Scripting, although quite experienced with spreadsheets since Lotus 123 (DOS). -- Knowledge when shared becomes a gift. Thank you for your bounty. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
script to increase last number in cell entry for hyperlink | Excel Programming | |||
Script - Create New Worksheet | Excel Discussion (Misc queries) | |||
How do I turn a VBA script on and off with an entry in a cell | Excel Programming | |||
Help in adding XML maps to a worksheet using a script | Excel Programming | |||
Date Entry Script | Excel Programming |