You are here:

Using Lotus Notes/Using Excel VBA convet to LotusScript

Advertisement


Question
Hi,

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!

Answer
This 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

Using Lotus Notes

All Answers


Ask Experts

Volunteer


Paski K. Paskaradevan

Expertise

I have 3 + years in Lotus Notes application development. I am a CLP R5 Application Development. I can answer any question pertaining to application development.

Experience

R5 CLP. In addition, I have a bachelors degree in Engineering and a MBA.

©2012 About.com, a part of The New York Times Company. All rights reserved.