OK,
This must be something simple. That I just don't see.
If I want to store the active workbook in a property.
I am trying the following code. However I am getting an error on setting
the activeworkbook.
Anyone have any ideas?
thanks
Private m_objWorkspaceWorkbook As New Excel.Workbook
Public Property Set WorkspaceWorkbook(ByVal vData As Excel.Workbook)
Set m_objWorkspaceWorkbook = vData
End Property
Public Property Get WorkspaceWorkbook() As Excel.Workbook
Set WorkspaceWorkbook = m_objWorkspaceWorkbook
End Property
Sub xxx()
Dim objWB As Excel.Workbook
Set objWB = Excel.ActiveWorkbook
WorkspaceWorkbook objWB '??????????
End Sub
JNW - 27 May 2008 23:46 GMT
I generally store the name then use that to recall the workbook later.
aWB = activeworkbook.name
workspaceworkbook = workbooks(aWB)
> OK,
> This must be something simple. That I just don't see.
[quoted text clipped - 20 lines]
> WorkspaceWorkbook objWB '??????????
> End Sub