A constant array?

  • Thread starter Thread starter Thief_
  • Start date Start date
T

Thief_

Can this be made valid in VBA:

Const wsNot2Process = Array("Summary", "GraphResults", "*backup")

Or do I have to assign the array to a non-constant array variable?
 
It looks like your choices are...

1. Const wsNot2Process1 As String = "Summary"
Const wsNot2Process2 As String = "GraphResults"
Const wsNot2Process3 As String = "*backup"

2. Dim wsNot2Process As Variant
wsNot2Process = Array("Summary", "GraphResults", "*backup")

Jim Cone
San Francisco, USA
 
Thanks Jim.

--
|
+-- Thief_
|

Jim Cone said:
It looks like your choices are...

1. Const wsNot2Process1 As String = "Summary"
Const wsNot2Process2 As String = "GraphResults"
Const wsNot2Process3 As String = "*backup"

2. Dim wsNot2Process As Variant
wsNot2Process = Array("Summary", "GraphResults", "*backup")

Jim Cone
San Francisco, USA
 
alternative
store the constant as a delimieted string,
create the array with split function

const x = "Summary;Graphresults;Backup"

....
msgbox split(x,";")(0)




--
keepITcool
| www.XLsupport.com | keepITcool chello nl | amsterdam


Jim Cone wrote :
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top