Consulting

Results 1 to 3 of 3

Thread: Sleeper: Running a VB Function From Excel

  1. #1
    VBAX Regular
    Joined
    Jul 2005
    Posts
    15
    Location

    Sleeper: Running a VB Function From Excel

    hi, i've been looking for ages on the internet, i've discovered (well told on a forum) how to run a vba macro from a vb application, now i would like to know if its possible to do it the other way round,

    currenty i've been using the appactivate command in excel and using the sendkeys to send a letter accross, this results in the application having a case select code on keydown on the form, the problem is this seems random with its reliability, and i've noticed certain worksheet functions won't allow it work (been having a lot of problems with code i've written in the worksheet_before close, which brings me onto my next post...)

    I was wondering if anyone knew of away to do this? i have a feeling there isn't without being a pro at these things which i am not! but maybe one day

  2. #2
    VBAX Contributor Ivan F Moala's Avatar
    Joined
    May 2004
    Location
    Auckland New Zealand
    Posts
    185
    Location
    Hi Stead, which App is automating which ?? ie is your VB App automating Excel OR is Excel automating your VB App.
    Kind Regards,
    Ivan F Moala From the City of Sails

  3. #3
    VBAX Regular
    Joined
    Jul 2005
    Posts
    15
    Location
    well i guess its the VB App automating excel, however i would like them to be able to talk to each other?

    I Would like to keep the bulk of the userforms in the exe, as theres things i prefer in vb over vba, such as being able to set index's to objects!

    Currently the exe loads up, and then opens excel, loads the spreadsheet, runs a few macro's to set it up, then gives focus to excel and hides in the background.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •