Hi All
I have a bunch of variables in my code with the same name except for the last character.
Rather than have a select case statement I'd like to combine 2 variables...
e.g. I might have the following variables...
Dim PicJPG as string
Dim PicPNG as string
Dim PicBMP as string
Dim PicGIF as string
I want to assign a value to the variable like this
Pic & right(filename, 3) = thisdocument.path & filename
instead of
Select Case right(filename, 3)
Case JPG
PicJPG = ....
Case....
and so on... I have a lot of cases!
This is specifically for VBA
Thanks!
Our community of experts have been thoroughly vetted for their expertise and industry experience.
The Expert of the Year award recognizes an expert who helped improve Experts Exchange in the past year through high levels of contributions and participation on site. This award is given to the expert who has achieved the highest levels of participation, while maintaining quality contributions and professionalism.
The Distinguished Expert awards are presented to the top veteran and rookie experts to earn the most points in the top 50 topics.