[CLUE-Tech] Star Basic

George Gammel ggammel1 at yahoo.com
Sat Oct 23 01:28:16 MDT 2004


Hi All
I have listed below a few lines from a StarBasic macro I am trying to convert
from Excel.  This just isn't working and the "help" files aren't helping very
much.  Here what I wrote so far:

Option Explicit
Dim Cell As Object, Doc As Object, Sheet As Object
'
'Process New Data
'
Sub Process_Data()
    Dim Date1 As Date
    'Input Date to Process
    Date1 = InputBox("Enter Date of Data Being Processed.")
    Doc=StarDesktop.CurrentComponent    'Not sure this line is correct-No errors
    Sheet=Doc.Sheets.getByName("New")   'Object error when run from Basic IDE
    Cell=Sheet.getCellByName("A1")      'Object error when run from Spreadsheet
    Cell.Value = Date1

I think the heart of the problem begins on the Doc= line.  I think this is
intended to open the services for the spreadsheet objects.  I found this all
very confusing when reading the various help files.  Does anyone know the correct
syntax for establishing the service to spreadsheet objects?

Thanks much
George Gammel
ggammel1 at yahoo.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://cluedenver.org/pipermail/clue-tech/attachments/20041023/98633c49/attachment.html


More information about the clue-tech mailing list