LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 63
Default Sheet Referencing?

Thank You Tom.

"Tom Ogilvy" wrote:

Here is some untested pseudo code that should "show the way"

Private Sub Workbook_Open()
Dim bk as Workbook, sh as Worksheet
On Error Resume Next
set bk = Workbooks("Destination.xls")
set sh = bk.Worksheets("Tasks")
On Error goto 0
if bk is nothing then
msgbox "Destination.xls is not open"
exit sub
end if
if not sh is nothing then
Application.DisplayAlerts = False
sh.Delete
application.DisplayAlerts = true
end if
thisworkbook.Worksheets("Tasks").copy _
After:=bk.worksheets(bk.worksheets.count)
end Sub

this would go in the Thisworkbook module of the source workbook. Adjust to
fit your environment, functionality, requirements.

--
Regards,
Tom Ogilvy


"Benz" wrote:

I'm hoping someone can help me........... I want to be able to
open a workbook trigger a macro that will copy a spcific sheet titled "Tasks"
in its entirity and open it in another workbook overwriting any "Tasks"
sheet that was there. Thank you to anyone who helps.

 
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
Sheet Referencing - autofilling sheet names Pat Excel Worksheet Functions 2 June 4th 09 03:50 AM
copy formula referencing sheet name to another sheet Tat Excel Worksheet Functions 1 June 26th 05 03:00 AM
referencing a sheet named in a cell then using data from that sheet gbeard Excel Worksheet Functions 4 April 15th 05 08:42 AM
referencing another sheet James[_22_] Excel Programming 5 April 9th 04 10:16 PM
referencing a sheet in VB Mary Agnes Excel Programming 3 February 5th 04 02:41 PM


All times are GMT +1. The time now is 09:18 AM.

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"