Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 13
Default adding worksheet with spcific name

Hi there,

Can anyone help me with the code to add a worksheet in an excelsheet with a
specific name?
The name should be "data sheet"

thx in advance
Ruud


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 7
Default adding worksheet with spcific name

Hi, try this

Workbooks.Add
ActiveSheet.Name = "data sheet"

Filip

"SotjeRuud" píše v diskusním příspěvku
...
Hi there,

Can anyone help me with the code to add a worksheet in an excelsheet with

a
specific name?
The name should be "data sheet"

thx in advance
Ruud




  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 7
Default adding worksheet with spcific name

Sorry,
once more and better:

Sheets.Add
ActiveSheet.Name = "LongProfile"

In the first case I added workbook

Cus :-)

Filip


"SotjeRuud" píše v diskusním příspěvku
...
Hi there,

Can anyone help me with the code to add a worksheet in an excelsheet with

a
specific name?
The name should be "data sheet"

thx in advance
Ruud




  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,253
Default adding worksheet with spcific name

Ruud,

following should get u on your way..

Sub AddDataSheet()
Dim ws As Worksheet

On Error Resume Next
Set ws = Worksheets("data sheet")
On Error GoTo 0
If ws Is Nothing Then
Set ws = Worksheets.Add
ws.Name = "data sheet"
Else
'handle sheet exists here
End If
End Sub


keepITcool

< email : keepitcool chello nl (with @ and .)
< homepage: http://members.chello.nl/keepitcool


"SotjeRuud" wrote:

Hi there,

Can anyone help me with the code to add a worksheet in an excelsheet
with a specific name?
The name should be "data sheet"

thx in advance
Ruud




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
Hyperlink to a spcific worksheet Flipper Excel Discussion (Misc queries) 6 September 30th 09 05:15 PM
adding several worksheet cells onto a main worksheet oxicottin Excel Worksheet Functions 2 September 20th 06 08:07 PM
How to create a 'name' which is not worksheet spcific bj Excel Worksheet Functions 1 July 24th 06 10:28 AM
Adding worksheet tab names to the first worksheet adam Excel Discussion (Misc queries) 1 May 17th 06 02:07 AM
list worksheet macros/VBA without adding worksheet br549 Excel Discussion (Misc queries) 0 January 6th 06 10:17 PM


All times are GMT +1. The time now is 02:08 AM.

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"