Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
PaulW
 
Posts: n/a
Default VBA, Make a new sheet if it doesn't exist

Sub Button1_Click()

inset = Range("B3").Value
Sheets.Add
ActiveSheet.Name = "inset"
On Error GoTo Dele
Sheets("sdfs").Select
Range("A2").Select

Dele: ActiveSheet.Delete

End Sub

I'm wanting this button to make a new sheet within the workbook, named as
whatever is in B3 on the same sheet as the button. I only want it to do this
if this sheet does not already exist.

Its for recording productivity, and each sheet will be a person, and I want
part of the code to make a new sheet if that person doesn't already have a
sheet, new staff etc.
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
Lookup function and compare Student Excel Discussion (Misc queries) 8 April 25th 06 03:11 PM
How can i make link to different sheet irsath Links and Linking in Excel 0 January 22nd 06 05:48 AM
how do I make different col widths within same col. on same sheet Miker Charts and Charting in Excel 2 December 16th 05 04:57 AM
In Excel, how do you make one whole sheet equal to another. ryan Excel Discussion (Misc queries) 2 August 31st 05 07:03 PM
How do I make excel startup in a specific sheet? Siggi Excel Worksheet Functions 2 February 18th 05 08:24 PM


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