ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Workbook Name as Variable (https://www.excelbanter.com/excel-programming/351367-workbook-name-variable.html)

Herd

Workbook Name as Variable
 
I need to get the name of the active workbook assigned to a variable in the
Macro that I am trying to write. Is this possible?

Thanks,

Mark Lincoln

Workbook Name as Variable
 
Dim wbname as String

wbname = ActiveWorkbook.Name


Jim Thomlinson[_5_]

Workbook Name as Variable
 
Sub Workbookname()
Dim strActivebook As String

strActivebook = ActiveWorkbook.Name

End Sub

--
HTH...

Jim Thomlinson


"Herd" wrote:

I need to get the name of the active workbook assigned to a variable in the
Macro that I am trying to write. Is this possible?

Thanks,


Herd

Workbook Name as Variable
 


"Mark Lincoln" wrote:

Dim wbname as String

wbname = ActiveWorkbook.Name

Thank You for the fast reponse. It was very helpful


Herd

Workbook Name as Variable
 


"Jim Thomlinson" wrote:

Sub Workbookname()
Dim strActivebook As String

strActivebook = ActiveWorkbook.Name

End Sub
Thank You for the fast response. It was very helpful.
--
HTH...

Jim Thomlinson


"Herd" wrote:

I need to get the name of the active workbook assigned to a variable in the
Macro that I am trying to write. Is this possible?

Thanks,



All times are GMT +1. The time now is 02:46 PM.

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