F
Faraz A. Qureshi
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?
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?