Using Lotus Notes/Using Excel VBA convet to LotusScript
Expert: Paski K. Paskaradevan - 1/1/2010
QuestionHi,
I would like ask how to convert an Excel VBA to Lotus Script.
Below is the sample program code.
Can you help convert it to Lotus script.
Sub Macro1()
'
' Macro1 Macro
' Macro recorded 1/1/2010 by Salvador
'
'
Workbooks.Open Filename:="C:\excelfile.xls"
ActiveWindow.Visible = False
ActiveSheet.OLEObjects.Add(Filename:="C:\excelfile.xls", Link:=False, _
DisplayAsIcon:=True, IconFileName:= _
"C:\Windows\Installer\{90280409-6000-11D3-8CFE-0050048383C9}\xlicons.exe", _
IconIndex:=0, IconLabel:="C:\excelfile.xls").Select
End Sub
Note : LotusScript does not recognise the filename:=, parameters.
Hope you can help me on this.
Thanks a lot!
AnswerThis is how lotus script goes. You will need to find out the vba script and do the rest.
Dim xlApp As Variant
Dim xlBook As Variant
Dim xlSheet As Variant
ChartPath$ = "c:\temp\temp.xls"
'Create an Excel instance
Set xlApp = CreateObject("Excel.Application")
Set xlBook = xlApp.Workbooks.Add
'Open a particular file (WorkBook)
' Set xlBook = xlApp.Workbooks.Open(ChartPath$)
'Set the Sheet we want to work with
Set xlSheet = xlBook.Worksheets("Sheet1")
'Activate the Sheet we just set
Call xlSheet.Activate