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. |
All times are GMT +1. The time now is 08:47 AM. |
Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com