#1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 40
Default 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" 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11
Default 2 workbooks

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

"moon" wrote in message
. ..

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" 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6,953
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11
Default 2 workbooks

Thank you!!!!!

"Tom Ogilvy" wrote in message
...
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
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Regular Workbooks vs. Binary Workbooks Jerry Excel Discussion (Misc queries) 1 April 28th 10 04:03 AM
Updating Workbooks from multiple links Workbooks TimJames Excel Worksheet Functions 1 December 15th 07 03:34 PM
Copy/ move selected data from workbooks to seperate worksheets or workbooks Positive Excel Worksheet Functions 1 August 30th 07 04:54 PM
Display 2 formulas from source workbooks to destination workbooks Excel_seek_help Excel Discussion (Misc queries) 4 April 27th 06 08:13 PM
suddenly my excel workbooks are "shared workbooks" Maggie's mom Excel Discussion (Misc queries) 1 August 28th 05 09:20 PM


All times are GMT +1. The time now is 11:22 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"