Variable Problem (1 Viewer)

kitty77

Registered User.
Local time
Yesterday, 20:23
Joined
May 27, 2019
Messages
713
I'm using the following code. How to do I get the value "comps" to appear where test is?
Because it's wrapped in the quotes, I'm getting just the word test. What am I doing wrong?

Dim test As String
If ([Mdid] = "COMP32145") Then test = "comps"
[Mlink] = "#\test\pdf\" & [Mspectraid1] & ".pdf#"
End Sub
 

MarkK

bit cruncher
Local time
Yesterday, 17:23
Joined
Mar 17, 2004
Messages
8,186
Look how you inserted Mspectraid1 into the string. Insert test the same way.
 

kitty77

Registered User.
Local time
Yesterday, 20:23
Joined
May 27, 2019
Messages
713
I see it now. Thanks!!
 

Users who are viewing this thread

Top Bottom