+ Reply to Thread
Results 1 to 2 of 2

remote writing to userforms

  1. #1
    Registered User
    Join Date
    10-03-2005
    Posts
    10

    remote writing to userforms

    I am trying to write to a userform from a macro. Consequently, the userform is a part of a macro of another workbook (workbook-B).

    I wrote a macro in workbook-A... it activates a macro in workbook-B. Part of workbook-B's subroutine opens a userform that requires addition info. I have the data to populate the userform, but do not know how to insert the data into the userform from the macro in workbook-A.

    Anyone have any experience here?

  2. #2
    Bob Phillips
    Guest

    Re: remote writing to userforms

    You could pass the values to tye macro as arguments, and then use those
    value as properties in the userform and load there.

    Workbook A

    Application.Run "WorkbookB.xls!that_macro", 4,8

    Workbook B
    Standard module

    Sub that_macro(a,b)
    Userform1.Value1 = a
    Userform1.Value2 = b
    Userform1.Show
    End Sub

    Userform

    Public Value1 as Long
    Public Value2 As Long


    "tad_wegner" <[email protected]> wrote
    in message news:[email protected]...
    >
    > I am trying to write to a userform from a macro. Consequently, the
    > userform is a part of a macro of another workbook (workbook-B).
    >
    > I wrote a macro in workbook-A... it activates a macro in workbook-B.
    > Part of workbook-B's subroutine opens a userform that requires addition
    > info. I have the data to populate the userform, but do not know how to
    > insert the data into the userform from the macro in workbook-A.
    >
    > Anyone have any experience here?
    >
    >
    > --
    > tad_wegner
    > ------------------------------------------------------------------------
    > tad_wegner's Profile:
    > http://www.excelforum.com/member.php...o&userid=27770
    > View this thread: http://www.excelforum.com/showthread...hreadid=472818
    >




+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

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

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1