D
Dan
Hi,
I am using the following code to manipulate an embedded Excel 2007
worksheet.
Problem is, the macro fails unless Excel 2007 is already open. How
can I force Excel 2007 to be open automatically?
Thanks
Dan
Private Sub SpinButton1_Change()
Dim xlApp As Excel.Application
Dim xlBook As Excel.Workbook
Dim xlSheet As Excel.Worksheet
Set xlApp = GetObject(, "Excel.Application")
Set xlSheet = xlApp.ActiveWorkbook.ActiveSheet
xlApp.Visible = False
current = xlSheet.Range("G4").Value
xlSheet.Range("G4").Value = SpinButton1.Value
For Each shp In Me.Shapes
If shp.Type = msoLinkedOLEObject Then
shp.LinkFormat.Update
End If
Next shp
End Sub
I am using the following code to manipulate an embedded Excel 2007
worksheet.
Problem is, the macro fails unless Excel 2007 is already open. How
can I force Excel 2007 to be open automatically?
Thanks
Dan
Private Sub SpinButton1_Change()
Dim xlApp As Excel.Application
Dim xlBook As Excel.Workbook
Dim xlSheet As Excel.Worksheet
Set xlApp = GetObject(, "Excel.Application")
Set xlSheet = xlApp.ActiveWorkbook.ActiveSheet
xlApp.Visible = False
current = xlSheet.Range("G4").Value
xlSheet.Range("G4").Value = SpinButton1.Value
For Each shp In Me.Shapes
If shp.Type = msoLinkedOLEObject Then
shp.LinkFormat.Update
End If
Next shp
End Sub