P
Patrice
Hi,
I'd like to run an Excel macro in an Access module. I did like that:
Set objXL = CreateObject("Excel.Application")
Set objWkb = objXL.Workbooks.Open(MyWorkBook)
Set objSht = objWkb.Worksheets(MySheet)
Rows("1:5" ).Select
'After that it is not working from Access
'But it's working if it's directly written in Excel
Selection.Delete Shift:=xlUp
I tried like that too
With objWkb
With objSht.Selection
.Delete Shift:=xlUp
End With
End With
But it's not working. So my question is How can I do to work with a Excel
selection true Access.
Also I tried to Run an Excel macro from Acces like that
strFile = MyXL.Run("MyWorkBook.xls!MyExcelMacro")
It's working but I don't know how to pass parameters to the ExcelMacro??
If some body can answer one of those questions It would make my day
Tank you very much
Patrice
I'd like to run an Excel macro in an Access module. I did like that:
Set objXL = CreateObject("Excel.Application")
Set objWkb = objXL.Workbooks.Open(MyWorkBook)
Set objSht = objWkb.Worksheets(MySheet)
Rows("1:5" ).Select
'After that it is not working from Access
'But it's working if it's directly written in Excel
Selection.Delete Shift:=xlUp
I tried like that too
With objWkb
With objSht.Selection
.Delete Shift:=xlUp
End With
End With
But it's not working. So my question is How can I do to work with a Excel
selection true Access.
Also I tried to Run an Excel macro from Acces like that
strFile = MyXL.Run("MyWorkBook.xls!MyExcelMacro")
It's working but I don't know how to pass parameters to the ExcelMacro??
If some body can answer one of those questions It would make my day
Tank you very much
Patrice