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 a sheet and name it

I need to write a macro which does the following

1) Create a new sheet in the current workbook

2) Scan the current sheet split each row into several columns and write
them in new sheet.

I know how to scan the current sheet but my problem is how, from the
current sheet, referer to the sheet I need to use to add rows. It is
not a copy row by row as sometimes several rows will make one row on
the new sheet

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,302
Default Create a sheet and name it

Hi JeanLuc,

Assign the new sheet to an object variable, e.g.:

'=============
Sub Tester()
Dim WB As Workbook
Dim srcSH As Worksheet
Dim destSH As Worksheet

Set srcSH = ActiveSheet
Set destSH = WB.Sheets.Add(After:=Sheets(WB.Sheets.Count))

'Your copy code, e.g.:
srcSH.Range("A1").Copy Destination:=destSH.Range("C1")
End Sub
'<<=============

---
Regards,
Norman



wrote in message
oups.com...
I need to write a macro which does the following

1) Create a new sheet in the current workbook

2) Scan the current sheet split each row into several columns and write
them in new sheet.

I know how to scan the current sheet but my problem is how, from the
current sheet, referer to the sheet I need to use to add rows. It is
not a copy row by row as sometimes several rows will make one row on
the new sheet



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
How to create Login & Log out Spread sheet in Excel with automated Attendance sheet marc5354 Excel Worksheet Functions 2 September 21st 10 04:22 PM
create a formula in one sheet that would read data from separate sheet automatically QD Excel Discussion (Misc queries) 0 December 8th 06 04:17 AM
How to create a formala in one sheet for a cell in another sheet? Beth Excel Worksheet Functions 1 October 20th 05 02:14 PM
How do I create a command button to jump from sheet to sheet in a. Darlenew Excel Worksheet Functions 3 March 22nd 05 10:36 PM
How to create a Macro to Copy Information in one sheet to another sheet. poppy Excel Programming 3 July 28th 04 07:26 AM


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