ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Assistance with variables defined outside of macro (https://www.excelbanter.com/excel-programming/347086-assistance-variables-defined-outside-macro.html)

Barb Reinhardt

Assistance with variables defined outside of macro
 
I have the following (very abbreviated macro)

Sub AllSummary()
Dim Tabname As String
Tabname = "SUMMARY (A)"
Call SheetSummary
End Sub

What do I need to do within SheetSummary so that it recognizes the Tabname
defined here?

Jim Thomlinson[_4_]

Assistance with variables defined outside of macro
 
Give this a whirl...

Sub AllSummary()
Dim Tabname As String
Tabname = "SUMMARY (A)"
Call SheetSummary(Tabname)
End Sub

Sub SheetSummary(ByVal strSheetName as string)
msgbox strSheetName
end sub

--
HTH...

Jim Thomlinson


"Barb Reinhardt" wrote:

I have the following (very abbreviated macro)

Sub AllSummary()
Dim Tabname As String
Tabname = "SUMMARY (A)"
Call SheetSummary
End Sub

What do I need to do within SheetSummary so that it recognizes the Tabname
defined here?



All times are GMT +1. The time now is 09:53 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com