Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default copying sheet with macro

On my worksheet (totals hours worked each day for all employes) I have
macro assigned to a button (update) on the worksheet which copies th
sheet, deletes all data and then updates the dates to the next week
The problem is, when I click the button and it copies the worksheet i
always uses the original sheet (sheet1) instead of using the ne
updated sheet (sheet2,3,ect.) when I run the macro each additiona
time. I understand that the macro is referencing sheet1, but I don'
know how to make it reference the active sheet. Help would be greatl
appreciated. Thanks

--
Message posted from http://www.ExcelForum.com

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 140
Default copying sheet with macro

mcrmike < wrote:

On my worksheet (totals hours worked each day for all employes) I have a
macro assigned to a button (update) on the worksheet which copies the
sheet, deletes all data and then updates the dates to the next week.
The problem is, when I click the button and it copies the worksheet it
always uses the original sheet (sheet1) instead of using the new
updated sheet (sheet2,3,ect.) when I run the macro each additional
time. I understand that the macro is referencing sheet1, but I don't
know how to make it reference the active sheet. Help would be greatly
appreciated. Thanks.


Search in your code the references to sheet1 and change it for ActiveSheet.

Regards,
--
Beto
Reply: Erase between the dot (inclusive) and the @.
Responder: Borra la frase obvia y el punto previo.

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default copying sheet with macro

Thanks, Beto it worked fine, things are good with the world again.


---
Message posted from http://www.ExcelForum.com/

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
Need help Taking alot data from one sheet (if not blank) and copying toa list on another sheet. Alex Zuniga Excel Worksheet Functions 1 November 25th 09 11:54 PM
Dynamic column chart - copying from Sheet to Sheet. Marko Pinteric Excel Discussion (Misc queries) 1 April 10th 06 12:57 PM
Dynamic column chart - copying from Sheet to Sheet. Marko Pinteric Charts and Charting in Excel 1 April 10th 06 12:57 PM
2 questions, copying data from sheet to sheet and assigning macro Boris Excel Worksheet Functions 0 December 16th 04 06:11 PM
macro stops copying sheets into a book after the 11th sheet MISMitch Excel Programming 1 October 22nd 03 05:27 PM


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