![]() |
#1
|
|||
|
|||
![]()
I understand how to declare a Public Constant and set its value eg . . .
Public Const <name> as String = <value> However I want to define the value as a concatenated string eg . . . Public Const <name> as String = "C:\Users" & Environ$("username") & "\OneDrive" . . . but this fails with "Compile error". I can get round this by just declaring the constant's name, then setting its value in the Auto-Open macro. I was wondering if there is a better or neater way to do this ? |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
![]() |
VBorNotVB | Word VBA | 3 | 12-06-2020 09:28 PM |
Declaring Public variables and accessing in other modules | rekent | Word VBA | 16 | 11-24-2020 02:09 PM |
![]() |
Officer_Bierschnitt | Excel Programming | 5 | 11-18-2015 12:28 PM |
![]() |
jprt68 | Excel | 1 | 06-26-2012 08:31 AM |
![]() |
MSmand | Excel | 2 | 07-13-2011 01:14 PM |