Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
james
Creator III
Creator III

VBA script during load?

Good evening,

is it possible to use a vba script during a load?

I have some code that returns all Active Dirctory namse and who is assigned to said AD.

ANy ideas?

4 Replies
Anonymous
Not applicable

Hi James,

Yes, it's possible to run VB Script during script load. There are certain restrictions for accessing the contents of the QlikView document, mainly targetting objects under ActiveDocument. For accessing external sources it should be fine though. Not sure if there are better ways to query an AD using some kind of ODBC driver or similar.

james
Creator III
Creator III
Author

Im trying to download all of the Active Directort Groups and their subsets

I have VBA code that works fine in exce, but I cnat get it to work in the load..

any ideas?

Sub GetADNames

Dim objGroup, objExcel, iRow, strUser, iColumn

Dim X As String

"A1"). Select

Do While ActiveCell.SpecialCells(xlCellTypeLastCell).Column + 1 > ActiveCell.Column

On Error Resume Next

Set objGroup = GetObject("LDAP://CN=" & X & ",ou=Qlikview Groups, ou=groups,ou=Users & Groups,dc=Test,dc=com")

For Each strUser In objGroup.Member

Set objUser = GetObject("LDAP://" & strUser)

Next

End With

Set objExcel = Nothing

Set objGroup = Nothing

Select

loop

End Sub

Anonymous
Not applicable

Hi,

Accidentally suggested your post as a solution. Buttons are too close for me 🙂

Anyway, what happens when you try to run the sub? It looks a little wierd to me also since you try to traverse an Excel file but there is no mention of creating any excel com object or loading any document.

james
Creator III
Creator III
Author

I cant figure out how to call up the excel object?