+ Reply to Thread
Results 1 to 5 of 5

2 workbooks

  1. #1
    zoot
    Guest

    2 workbooks

    Can anyone tell me if this is possible and if so the procedure to code.

    I have 2 workbooks. I want to call a procedure from workbook 1 and run it
    in workbook 2.

    As well I want to make reference to certain cells in the 1st workbook is
    this possible?

    thanks for your help



  2. #2
    moon
    Guest

    Re: 2 workbooks


    Public Sub dothehokiepokie()
    Dim wb As Workbook
    Dim ws1 As Worksheet
    Dim ws2 As Worksheet

    Set wb = ThisWorkbook
    Set ws1 = wb.Sheets("Sheet1")
    Set ws2 = wb.Sheets("Sheet2")

    ws1.Cells(1, 1).Value = "Test123"
    ws2.Cells(1, 1).Value = "Test123"
    End Sub



    "zoot" <dag11@shaw.ca> schreef in bericht
    news:fZ8vg.208562$Mn5.66816@pd7tw3no...
    > Can anyone tell me if this is possible and if so the procedure to code.
    >
    > I have 2 workbooks. I want to call a procedure from workbook 1 and run it
    > in workbook 2.
    >
    > As well I want to make reference to certain cells in the 1st workbook is
    > this possible?
    >
    > thanks for your help
    >




  3. #3
    zoot
    Guest

    Re: 2 workbooks

    Thank you!! but how would you call a procedure from that workbook?

    "moon" <hounganNOSPAM@planet.nl> wrote in message
    news:44bd2012$0$2023$ba620dc5@text.nova.planet.nl...
    >
    > Public Sub dothehokiepokie()
    > Dim wb As Workbook
    > Dim ws1 As Worksheet
    > Dim ws2 As Worksheet
    >
    > Set wb = ThisWorkbook
    > Set ws1 = wb.Sheets("Sheet1")
    > Set ws2 = wb.Sheets("Sheet2")
    >
    > ws1.Cells(1, 1).Value = "Test123"
    > ws2.Cells(1, 1).Value = "Test123"
    > End Sub
    >
    >
    >
    > "zoot" <dag11@shaw.ca> schreef in bericht
    > news:fZ8vg.208562$Mn5.66816@pd7tw3no...
    >> Can anyone tell me if this is possible and if so the procedure to code.
    >>
    >> I have 2 workbooks. I want to call a procedure from workbook 1 and run
    >> it in workbook 2.
    >>
    >> As well I want to make reference to certain cells in the 1st workbook is
    >> this possible?
    >>
    >> thanks for your help
    >>

    >
    >




  4. #4
    Tom Ogilvy
    Guest

    RE: 2 workbooks

    If the macro MyMacro is in Module1 of a workbook named Book1.xls then from
    another workbook you could do

    Application.Run "Book1.xls!MyMacro"

    someone else showed you how to reference cells in the other workbook.

    --
    Regards,
    Tom Ogilvy


    "zoot" wrote:

    > Can anyone tell me if this is possible and if so the procedure to code.
    >
    > I have 2 workbooks. I want to call a procedure from workbook 1 and run it
    > in workbook 2.
    >
    > As well I want to make reference to certain cells in the 1st workbook is
    > this possible?
    >
    > thanks for your help
    >
    >
    >


  5. #5
    zoot
    Guest

    Re: 2 workbooks

    Thank you!!!!!

    "Tom Ogilvy" <TomOgilvy@discussions.microsoft.com> wrote in message
    news:2170D4D9-1A32-47F0-B85B-583A879078F2@microsoft.com...
    > If the macro MyMacro is in Module1 of a workbook named Book1.xls then from
    > another workbook you could do
    >
    > Application.Run "Book1.xls!MyMacro"
    >
    > someone else showed you how to reference cells in the other workbook.
    >
    > --
    > Regards,
    > Tom Ogilvy
    >
    >
    > "zoot" wrote:
    >
    >> Can anyone tell me if this is possible and if so the procedure to code.
    >>
    >> I have 2 workbooks. I want to call a procedure from workbook 1 and run
    >> it
    >> in workbook 2.
    >>
    >> As well I want to make reference to certain cells in the 1st workbook is
    >> this possible?
    >>
    >> thanks for your help
    >>
    >>
    >>




+ 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