Consulting

Results 1 to 4 of 4

Thread: Comunicate between 2 userforms

  1. #1

    Comunicate between 2 userforms

    Hi,

    I have a problem and wonder if solution is even possible using VBA. I've already gave up, but maybe you guys will have any ideas
    Let's say that I have Excel file, which is shared and opened at 2 different workstations. I have one userform1 opened at Workstation 1 and one userform2 at Workstation 2.
    Userform1 has just one button1, and userform2 has a label2. Do you think it is possible to create some macro which changes color of label2 (in userform2), when pressing button1 (in userform1) - once more - these userforms are opened at 2 different workstations?
    I've tried many different ways, but none of them seems to work.

    Thanks,
    Mike

  2. #2
    Distinguished Lord of VBAX VBAX Grand Master Bob Phillips's Avatar
    Joined
    Apr 2005
    Posts
    25,453
    Location
    Not tried it, but wouldn't it be something like

        UserForm2.Label1.BackColor = vbRed
    Show the forms modeless.
    ____________________________________________
    Nihil simul inventum est et perfectum

    Abusus non tollit usum

    Last night I dreamed of a small consolation enjoyed only by the blind: Nobody knows the trouble I've not seen!
    James Thurber

  3. #3
    You would need code that runs on a timer which checks for a value somewhere (textfile?). And then you would need some code that updates the textfile on the other end.
    BTW: Shared workbooks are a bad idea.
    Regards,

    Jan Karel Pieterse
    Excel MVP jkp-ads.com

  4. #4
    Moderator VBAX Sage SamT's Avatar
    Joined
    Oct 2006
    Location
    Near Columbia
    Posts
    7,814
    Location
    Maybe an OLE kludge?
    I expect the student to do their homework and find all the errrors I leeve in.


    Please take the time to read the Forum FAQ

Posting Permissions

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