Manage Learn to apply best practices and optimize your operations.

Creating a Lotus component spreadsheet on the fly

Creating a Lotus component spreadsheet on the fly

This agent will create a Lotus component spreadsheet called "VBSheet". Get user input to be entered into the spreadsheet. I have a form called dfVB which will store the spreadsheet component.

Sub Initialize
Dim ws As New notesuiworkspace
Dim s As New notessession
Dim db As notesdatabase
Set db = s.currentdatabase

'**Creates the dfVB Document
Dim doc As New notesDocument (db)
doc.Form = "dfVB"
'**Creates the "Body" field and embed
'**the "VBSheet" component
Set rtitem = New notesrichtextitem (doc, "Body")
Set object = rtitem.EmbedObject(EMBED_OBJECT, "VBSheet", "", "VBSheet")
Set rsheet = object.Activate (False)
'**Gets user input
res = ws.DialogBox( "dgfVB2",  True, True, False, True, False, readOnly, _
"Input Data", doc )   

If res = False Then
  Exit Sub
End If

'**Gets the input value entered by the
cVBJabatan = s.GETENVIRONMENTSTRING("jabatan")
iVBFirstAlloc = s.GETENVIRONMENTVALUE("alloc")	

'** Sets value on the spreadsheet
with rsheet
.ltsSetEntryRC 3, 3,  "Peruntukan seperti dalam Anggaran Tahunan"
.ltsSetEntryRC 3, 2, cvbJabatan
.ltsSetEntryRC 3, 12,  iVbFirstAlloc  
end with

'**Clears all environment variable
Call s.SETENVIRONMENTVAR("jabatan", "")
Call s.SETENVIRONMENTVAR("alloc", "")

call (false, false)	
End Sub

Dig Deeper on Lotus Notes Domino Administration Tools

Start the conversation

Send me notifications when other members comment.

Please create a username to comment.




  • iSeries tutorials's tutorials provide in-depth information on the iSeries. Our iSeries tutorials address areas you need to know about...

  • V6R1 upgrade planning checklist

    When upgrading to V6R1, make sure your software will be supported, your programs will function and the correct PTFs have been ...

  • Connecting multiple iSeries systems through DDM

    Working with databases over multiple iSeries systems can be simple when remotely connecting logical partitions with distributed ...