3
votes

maybe someone could help me to understand, what I'm doing wrong, as I'm stuck.. In general, I have a process, where I have an .vbs file, that triggers macro file, which makes connection to Hyperion and refreshes sheets.

For some reason, when I'm triggering that macro, it always asks me to enter credentials, even if I've declared them (which of course crushes automation).

Currently I have such code - two declarations:

Declare Function HypMenuVRefreshAll Lib "HsAddin.dll" () As Long
Declare Function HypConnect Lib "HsAddin" (ByVal vtSheetName As Variant, ByVal vtUserName As Variant, ByVal vtPassword As Variant, ByVal vtFriendlyName As Variant) As Long

and then refresh happens with such part:

Public Sub Connect_OBIEE()

Dim wsSheet As Worksheet


For Each wsSheet In ActiveWorkbook.Worksheets
    x = HypConnect(wsSheet.Name, "<login>", "<password>", "<name of connection>")
Next wsSheet

lngReturn = HypMenuVRefreshAll()

End Sub

How can I avoid the connection pop-up window, where it asks again my credentials, which if I will enter, will of course be working fine and then everything goes as I need..

So the general point is here, that my vbs file, that triggers macro, should enter everything automatically, refresh files, save and close, without these popu-ups.

Any suggestions?

1
Hello, did you find any solution to this issue ?Idriss Benbassou
Unfortunately no :/ Tried multiple options but still that pop-up comes.Yuriy T.

1 Answers

0
votes

I used your code as my base and encountered the same issue as you. I fixed by changing my server name. I used the syntax below:

HypConnect("Sheet1", "UserName", "Password", "http://hostname:19000/aps/SmartView|servername|Sample|Basic")

I then had to change my URL from the one found in SmartView Options to the one that appears in the dialog box that prompts you for your password which was slightly different

The "servername|Sample|Basic" should be the same syntax that is listed on your Smart View Panel for your Recently Used connections