Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Create New Wk


Hi folks:

I have an Excel file with a list of 150 names or more, one name per
cell in column A. This list changes weekly. I need to create a
workbook with using those names one name per worksheet, meaning each
tab name in the new workbook would be the list.

Any thoughts?

thanks in advance :)


--
halem2
------------------------------------------------------------------------
halem2's Profile: http://www.excelforum.com/member.php...fo&userid=9930
View this thread: http://www.excelforum.com/showthread...hreadid=556892

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 36
Default Create New Wk

On Thu, 29 Jun 2006 08:38:36 -0500, halem2 wrote:

Hi folks:

I have an Excel file with a list of 150 names or more, one name per
cell in column A. This list changes weekly. I need to create a
workbook with using those names one name per worksheet, meaning each
tab name in the new workbook would be the list.

Any thoughts?

thanks in advance :)


Sub GenerateWB()
Dim rng As Excel.Range
Dim wkb As Excel.Workbook
Workbooks.Add
Set wkb = ActiveWorkbook
Set rng = Me.Range("A1")
Do While rng.Value < ""
wkb.Sheets.Add
wkb.ActiveSheet.Name = rng.Value
Set rng = rng.Offset(1, 0)
Loop
End Sub

--
PL
  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Create New Wk


thanks. I'm getting en error pointing to invalid use of ME.


--
halem2
------------------------------------------------------------------------
halem2's Profile: http://www.excelforum.com/member.php...fo&userid=9930
View this thread: http://www.excelforum.com/showthread...hreadid=556892

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 36
Default Create New Wk

On Thu, 29 Jun 2006 09:18:15 -0500, halem2 wrote:

thanks. I'm getting en error pointing to invalid use of ME.


This code works fine if you put in into a worksheet module. If you want to
use it as a separate module, use ThisWorkbook.Sheets("sheetname") instead
of Me

--
PL
  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Create New Wk


thanks a lot. I was able to ncorporate your code into my project.
Thanks again.


--
halem2
------------------------------------------------------------------------
halem2's Profile: http://www.excelforum.com/member.php...fo&userid=9930
View this thread: http://www.excelforum.com/showthread...hreadid=556892

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
Create a macro to create excel line graph with coloured pointers anddata lables anuj datta Charts and Charting in Excel 1 September 30th 09 04:04 PM
How to create adress list so can mail merge and create labels? adecocq Excel Discussion (Misc queries) 2 October 25th 06 12:32 AM
How to create a form to insert a hyerlink.VBA code to create a for karthi Excel Discussion (Misc queries) 0 July 5th 06 11:26 AM
Create dictionary of terms, create first time user site Solitaire Jane Austin New Users to Excel 1 January 19th 06 09:47 PM
need to create a formula to create a timesheet but haven't a clue AHurd Excel Discussion (Misc queries) 7 August 22nd 05 12:04 PM


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