LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 211
Default How to refer to a workbook?

I usually need to refer to other books during a macro. Lets consider a simple
sample as follows:

Sub SpclMcro()
Dim SrcWS As Worksheet
Dim DstWS As Worksheet
Dim SrcWB As Workbook
Dim Dst As Workbook
Dim Src As Range, Dest As Range
Set Src = Application.InputBox("WHAT?", , , , , , , 8)
Set Dest = Application.InputBox("WHERE?", , , , , , , 8)
MsgBox Src.Workbook.Name
Src.Copy Dest
End Sub

How can I get the name of the workbook of a cell/range as in:

MsgBox Src.Workbook.Name

Furthermore how to select a destination in ANY other workbook because during
the inputbox display of:

Set Dest = Application.InputBox("WHERE?", , , , , , , 8)

the workbook selection mode is inactive?

--
Thanx in advance,
Best Regards,

Faraz
 
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 refer to a cell from another workbook in VBA diepvic Excel Programming 4 June 24th 09 09:52 AM
How to Refer to Another Excel Workbook hon123456 Excel Programming 1 January 4th 08 09:33 AM
Refer to workbook Arne Hegefors Excel Programming 1 November 15th 07 09:20 AM
Refer to more than one worksheet in a workbook Göran M Excel Worksheet Functions 0 January 2nd 06 07:02 AM
how to I refer to current workbook without using its name? confused Excel Worksheet Functions 2 June 16th 05 11:50 PM


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