G
greg
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
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