Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
I have to solve the following problem:
The user can see listboxes of different fields which are not related to each other... Somehow when the user selects a value of a field I would like to fill a new sheet object via Visual Basic Script with:
Dimension 1 - value of selected field
Then when the user selects another value of a different field, it is appended to that object:
Dimension 1 - value of selected field
Dimension 2 - value of another field
Which sheet object allows it to be filled with costumized values?? For instance something like a MultiBox where I can add a Field 'Dimension 1' with 'value of selected field' would be useful...
whiterabbit,
Have you tried using a Current Selections Box?
Choose New Sheet Object... Current Selections Box
hth,
Tony
Thanks for your reply, but that's not what I am looking for... Because I need to fill the object with values:
Dimension1 - Value
independently from which Field the value is, I want to fill the Object via VB script with Label "Dimension 1" and a value and the entry should remain until I remove it via VB script (therefore the selections should not affect the sheet object)
i shee. in that case, i don't know!, sorry!
Tony
Take a look at this example from QlikView´s APIGUIDE.qvw:
sub LogFunktion
'This routine logs selection to a text file
set fso = CreateObject("Scripting.FileSystemObject")
set mypath = ActiveDocument.GetProperties
directory = mypath.MyWorkingDirectory
On Error Resume Next
' See if file already exists.
Set filFile = fso.GetFile(directory & "log.txt")
' If not, then create it.
If Err <> 0 Then
Set filFile = fso.CreateTextFile(directory & "log.txt")
End If
Set txsStream = filFile.OpenAsTextStream(8) 'For Appending
set doc = ActiveDocument
set mySelections = doc.fields("Field").GetSelectedValues
for i = 0 to mySelections.Count - 1
txsStream.WriteLine Now & " " & mySelections.Item(i).text
next
txsStream.WriteBlankLines 1
txsStream.Close
end sub
Hope it helps