Prev: solver: an unexpected internal error occurred, or available memory was exhausted
Next: Use XIRR FUNCTION IN A VB 2005 PROGRAM
From: Teresa E on 14 Nov 2006 09:36 I am trying to use sessionvariable("Logon_User") in the ASPTypeLibrary.Request object in an Excel macro. I am getting the run-time error 91 object variable or with variable not set each time I try to get the logon_user. The code I am using is: I tried to set the oRequest to new asptypelibrary.request but, an error occurs. Dim oRequest as ASPTypeLibrary.Request With oRequest myUserName = .ServerVariables("Logon_User") End With I cannot createobject("ASPTypeLibrary.Request"). Please help me with my syntax to retrieve the logon user (IE) name. I don't need the Environ("Username"). The user is logging in from a web page. I have also created a user defined activex dll to retrieve the logon name. This works in ASP but not in the macro. Can this be done using a macro? Thanks, Teresa
From: NickHK on 14 Nov 2006 23:06 I don't know the ASPTypeLibrary, but are not creating an object. Dim oRequest as ASPTypeLibrary.Request Set oRequest = CreateObject("ASPTypeLibrary.Request"). 'etc.... So this code is designed to run on the webserver ? IIRC MS do not support or advise running Excel in this environment. NickHK "Teresa E" <TeresaE(a)discussions.microsoft.com> wrote in message news:BA86B4AE-BEA5-4DA7-A70E-52D262D20B7F(a)microsoft.com... > I am trying to use sessionvariable("Logon_User") in the > ASPTypeLibrary.Request object in an Excel macro. I am getting the run-time > error 91 object variable or with variable not set each time I try to get the > logon_user. The code I am using is: > I tried to set the oRequest to new asptypelibrary.request but, an error > occurs. > > Dim oRequest as ASPTypeLibrary.Request > With oRequest > myUserName = .ServerVariables("Logon_User") > End With > > I cannot createobject("ASPTypeLibrary.Request"). > > Please help me with my syntax to retrieve the logon user (IE) name. I don't > need the Environ("Username"). The user is logging in from a web page. > > I have also created a user defined activex dll to retrieve the logon name. > This works in ASP but not in the macro. > > Can this be done using a macro? > > Thanks, > > Teresa >
From: Teresa E on 16 Nov 2006 08:22 When using the CreateObject("ASPTypeLibrary.Request"), I get an error stating cannot create library. "NickHK" wrote: > I don't know the ASPTypeLibrary, but are not creating an object. > > Dim oRequest as ASPTypeLibrary.Request > Set oRequest = CreateObject("ASPTypeLibrary.Request"). > > 'etc.... > > So this code is designed to run on the webserver ? > IIRC MS do not support or advise running Excel in this environment. > > NickHK > > "Teresa E" <TeresaE(a)discussions.microsoft.com> wrote in message > news:BA86B4AE-BEA5-4DA7-A70E-52D262D20B7F(a)microsoft.com... > > I am trying to use sessionvariable("Logon_User") in the > > ASPTypeLibrary.Request object in an Excel macro. I am getting the > run-time > > error 91 object variable or with variable not set each time I try to get > the > > logon_user. The code I am using is: > > I tried to set the oRequest to new asptypelibrary.request but, an error > > occurs. > > > > Dim oRequest as ASPTypeLibrary.Request > > With oRequest > > myUserName = .ServerVariables("Logon_User") > > End With > > > > I cannot createobject("ASPTypeLibrary.Request"). > > > > Please help me with my syntax to retrieve the logon user (IE) name. I > don't > > need the Environ("Username"). The user is logging in from a web page. > > > > I have also created a user defined activex dll to retrieve the logon name. > > This works in ASP but not in the macro. > > > > Can this be done using a macro? > > > > Thanks, > > > > Teresa > > > > >
From: NickHK on 16 Nov 2006 20:58 Teresa, http://pubs.logicalexpressions.com/Pub0009/LPMArticle.asp?ID=227 But as you are working in Excel/VBA not ASP, I can't tell you how to do it, as you do not have "GetObjectContext". NickHK "Teresa E" <TeresaE(a)discussions.microsoft.com> wrote in message news:93965F64-FD59-4C76-BE21-14A3E8FC5B85(a)microsoft.com... > When using the CreateObject("ASPTypeLibrary.Request"), I get an error stating > cannot create library. > > "NickHK" wrote: > > > I don't know the ASPTypeLibrary, but are not creating an object. > > > > Dim oRequest as ASPTypeLibrary.Request > > Set oRequest = CreateObject("ASPTypeLibrary.Request"). > > > > 'etc.... > > > > So this code is designed to run on the webserver ? > > IIRC MS do not support or advise running Excel in this environment. > > > > NickHK > > > > "Teresa E" <TeresaE(a)discussions.microsoft.com> wrote in message > > news:BA86B4AE-BEA5-4DA7-A70E-52D262D20B7F(a)microsoft.com... > > > I am trying to use sessionvariable("Logon_User") in the > > > ASPTypeLibrary.Request object in an Excel macro. I am getting the > > run-time > > > error 91 object variable or with variable not set each time I try to get > > the > > > logon_user. The code I am using is: > > > I tried to set the oRequest to new asptypelibrary.request but, an error > > > occurs. > > > > > > Dim oRequest as ASPTypeLibrary.Request > > > With oRequest > > > myUserName = .ServerVariables("Logon_User") > > > End With > > > > > > I cannot createobject("ASPTypeLibrary.Request"). > > > > > > Please help me with my syntax to retrieve the logon user (IE) name. I > > don't > > > need the Environ("Username"). The user is logging in from a web page. > > > > > > I have also created a user defined activex dll to retrieve the logon name. > > > This works in ASP but not in the macro. > > > > > > Can this be done using a macro? > > > > > > Thanks, > > > > > > Teresa > > > > > > > > >
From: Teresa E on 17 Nov 2006 07:58
I talked with Microsoft and they stated that what I want to do is unsupported. VBA is very limited. "NickHK" wrote: > Teresa, > http://pubs.logicalexpressions.com/Pub0009/LPMArticle.asp?ID=227 > > But as you are working in Excel/VBA not ASP, I can't tell you how to do it, > as you do not have "GetObjectContext". > > NickHK > > "Teresa E" <TeresaE(a)discussions.microsoft.com> wrote in message > news:93965F64-FD59-4C76-BE21-14A3E8FC5B85(a)microsoft.com... > > When using the CreateObject("ASPTypeLibrary.Request"), I get an error > stating > > cannot create library. > > > > "NickHK" wrote: > > > > > I don't know the ASPTypeLibrary, but are not creating an object. > > > > > > Dim oRequest as ASPTypeLibrary.Request > > > Set oRequest = CreateObject("ASPTypeLibrary.Request"). > > > > > > 'etc.... > > > > > > So this code is designed to run on the webserver ? > > > IIRC MS do not support or advise running Excel in this environment. > > > > > > NickHK > > > > > > "Teresa E" <TeresaE(a)discussions.microsoft.com> wrote in message > > > news:BA86B4AE-BEA5-4DA7-A70E-52D262D20B7F(a)microsoft.com... > > > > I am trying to use sessionvariable("Logon_User") in the > > > > ASPTypeLibrary.Request object in an Excel macro. I am getting the > > > run-time > > > > error 91 object variable or with variable not set each time I try to > get > > > the > > > > logon_user. The code I am using is: > > > > I tried to set the oRequest to new asptypelibrary.request but, an > error > > > > occurs. > > > > > > > > Dim oRequest as ASPTypeLibrary.Request > > > > With oRequest > > > > myUserName = .ServerVariables("Logon_User") > > > > End With > > > > > > > > I cannot createobject("ASPTypeLibrary.Request"). > > > > > > > > Please help me with my syntax to retrieve the logon user (IE) name. I > > > don't > > > > need the Environ("Username"). The user is logging in from a web page. > > > > > > > > I have also created a user defined activex dll to retrieve the logon > name. > > > > This works in ASP but not in the macro. > > > > > > > > Can this be done using a macro? > > > > > > > > Thanks, > > > > > > > > Teresa > > > > > > > > > > > > > > > > |