LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Declaring a constant to the Workbook Name?

I am trying to declare a constant which will hold the workbook name (Th
workbook running the macro that is).

So I am doing

Public Const WorkBookName As String = ThisWorkbook.name

First thing in Module 1 but I keep getting:

"Constant Expression Required"

How can I declare the constant with the workbooks name?

Best Regards

Noo

--
Message posted from http://www.ExcelForum.com

 
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
Reference constant cells in different files from a master workbook Byron Excel Worksheet Functions 1 November 18th 09 05:58 PM
Declaring variables freekrill Excel Discussion (Misc queries) 2 July 19th 06 06:36 AM
Declaring a DLL Erich Neuwirth Excel Programming 1 May 10th 04 06:27 PM
Declaring a variable? pgoodale[_4_] Excel Programming 2 January 2nd 04 03:26 PM
Declaring Variables Robert[_16_] Excel Programming 2 November 20th 03 04:16 PM


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

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"