Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4,391
Default Using SessionVariable(LOGON_USER) in VBA Excel macro

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" wrote in message
...
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



  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default Using SessionVariable(LOGON_USER) in VBA Excel macro

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" wrote in message
...
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




  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4,391
Default Using SessionVariable(LOGON_USER) in VBA Excel macro

Teresa,
http://pubs.logicalexpressions.com/P...cle.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" wrote in message
...
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" wrote in message
...
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






  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default Using SessionVariable(LOGON_USER) in VBA Excel macro

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/P...cle.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" wrote in message
...
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" wrote in message
...
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







  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4,391
Default Using SessionVariable(LOGON_USER) in VBA Excel macro

VBA is not limited, you are trying to do something the wrong way.
Think of a different method; maybe write a text file from ASP that can be
read in VBA ?

NickHK

"Teresa E" wrote in message
...
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/P...cle.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" wrote in message
...
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" wrote in message
...
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









Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Macro Help Needed - Excel 2007 - Print Macro with Auto Sort Gavin Excel Worksheet Functions 0 May 17th 07 01:20 PM
My excel macro recorder no longer shows up when recording macro jack Excel Discussion (Misc queries) 1 February 5th 07 09:31 PM
Need syntax for RUNning a Word macro with an argument, called from an Excel macro Steve[_84_] Excel Programming 3 July 6th 06 07:42 PM
translate lotus 1-2-3 macro into excel macro using excel 2000 krutledge0209 Excel Programming 1 November 2nd 04 05:50 PM
Excel Macro Issue Trying to autorun Macro Upon Opening Worksheet wyndman Excel Programming 2 May 25th 04 06:59 PM


All times are GMT +1. The time now is 08:03 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"