Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 576
Default Writing to 2nd worksheet in workbook

Mike,

Your code only shows a sort. There is nothing here that should overwrite
any data. What is the rest of your code? And how do you want to write to
the 2nd sheet?

You can copy from one sheet to the next with something like
Sheets("Sheet1").Range("A3:A100").Copy _
Destination:= Sheets("Sheet2").Range("A3")

where Sheet1 and Sheet2 are the names of the worksheets.
You only need to set a single cell for the paste.

--
sb
"Mike" wrote in message
...
Pulling data from an outside application into an Excel
workbook. Have multiple worksheets in the workbook. I
have been able to write to the first worksheet with the
correct data but then activate the 2nd worksheet to write
the different data to it but is overwriting the data on
the 1st worksheet. Although it changes and activates the
2nd worksheet.

'Get WELL Information

Worksheets("Wells").Activate
Range("A3:A100").Sort Key1:=Range("A1")

Does the Range need to be reset to the 2nd worksheet, if
so, how would I go about doing this.



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
Writing to another workbook Eric Hearn Excel Worksheet Functions 0 March 7th 08 02:15 PM
writing a macro to save a workbook Brian Excel Worksheet Functions 2 November 20th 07 04:02 AM
Writing formula for excel worksheet Gaurav New Users to Excel 5 February 23rd 07 01:06 PM
Copy Data from Workbook into specific Worksheet in other Workbook? kingdt Excel Discussion (Misc queries) 1 March 16th 06 06:55 PM
copy worksheet from closed workbook to active workbook using vba mango Excel Worksheet Functions 6 December 9th 04 07:55 AM


All times are GMT +1. The time now is 08:15 PM.

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"