Excel VBA reference a macro variable inside quotes -



Excel VBA reference a macro variable inside quotes -

i'm trying reference string macro variable insude quotes.

here's have. why couldn't &state. arrrggg!

thanks

dim state string state = "ak" workbooks.open filename:= _ "\\sac-psas-02\pm\ma\scott\ow\hpi trend pci outlier removal\lr_hpi_""" & state & """ .csv"

simply:

"\\sac-psas-02\pm\ma\scott\ow\hpi trend pci outlier removal\lr_hpi_" & state & ".csv"

(you need multiple " within string when want " character)

excel-vba

Comments

Popular posts from this blog

formatting - SAS SQL Datepart function returning odd values -

c++ - Apple Mach-O Linker Error(Duplicate Symbols For Architecture armv7) -

php - Yii 2: Unable to find a class into the extension 'yii2-admin' -