Reading who's logged in and running vba - Programmers Heaven

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

Reading who's logged in and running vba

pdunnpdunn Posts: 63Member
Hello, I have two seperate topics.

1) I would like to make a program that would give the user certain abilities based on, who is logged into Windows. Windows Server 2003 and Visual Basic 6 is being used. I would like to go into the Domain Controller and find out if that person has management rights or not. Or if that is located somewhere locally or an easier way that would work too.

I do not know where to start off from this one. I do not know what the technique is called. Please do offer assistance.

2) There is a vba script file for Microsoft Excel. I wanted to add database connectivity. I was typing in Dim cnConn as new adobd.Connection. Usually when typing that it would show options, but there was no option for adobd and when I use it anyway, I get an error message. I do not know how to work around this, so I was going to make a Visual Basic program. I am not sure if I could just copy and paste vba to a program. I do not believe there are any Excel specific information in the vba. I would like to know, could I just copy and paste vba into a basic program.

Thank you for your help.

Comments

  • BarkeeperBarkeeper Posts: 335Member
    For Q1: ActiveDirectory is your friend
    For Q2: Do you have checked the reference to the ADO-Object-Classes in your Excel/VBA-References?

    : Hello, I have two seperate topics.
    :
    : 1) I would like to make a program that would give the user certain
    : abilities based on, who is logged into Windows. Windows Server 2003
    : and Visual Basic 6 is being used. I would like to go into the
    : Domain Controller and find out if that person has management rights
    : or not. Or if that is located somewhere locally or an easier way
    : that would work too.
    :
    : I do not know where to start off from this one. I do not know what
    : the technique is called. Please do offer assistance.
    :
    : 2) There is a vba script file for Microsoft Excel. I wanted to add
    : database connectivity. I was typing in Dim cnConn as new
    : adobd.Connection. Usually when typing that it would show options,
    : but there was no option for adobd and when I use it anyway, I get an
    : error message. I do not know how to work around this, so I was
    : going to make a Visual Basic program. I am not sure if I could just
    : copy and paste vba to a program. I do not believe there are any
    : Excel specific information in the vba. I would like to know, could
    : I just copy and paste vba into a basic program.
    :
    : Thank you for your help.

    ------------------------------------------
    Only stupidity of mankind and the universe
    are infinite, but i'm not sure concerning
    the universe. A. Einstein
Sign In or Register to comment.