Howdy, Stranger!

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

Sign In with Facebook Sign In with Google Sign In with OpenID

Categories

We have migrated to a new platform! Please note that you will need to reset your password to log in (your credentials are still in-tact though). Please contact lee@programmersheaven.com if you have questions.
Welcome to the new platform of Programmer's Heaven! We apologize for the inconvenience caused, if you visited us from a broken link of the previous version. The main reason to move to a new platform is to provide more effective and collaborative experience to you all. Please feel free to experience the new platform and use its exciting features. Contact us for any issue that you need to get clarified. We are more than happy to help you.

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.