![]() |
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 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 |
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 |
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 |
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 |
All times are GMT +1. The time now is 03:56 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com