"X"syntax error??

MarkJ3301

New Member
Joined
Feb 3, 2014
Messages
3
I am trying to get to verify sizes and preform in if else if structure

i have sizes like "1/8"" and "1/4"" but I also have sizes like "1/2" x 3/4""

whenever i enter the pater size I get a syntax error

like:

if cmbsize.value = "1/2" X 3/4"" then
Do work

it stops me at the "x"

any suggestions?
thanks!

mark
 

Excel Facts

When they said...
When they said you are going to "Excel at life", they meant you "will be doing Excel your whole life".
Put some more quotes in, like maybe:

if cmbsize.value = ""1/2" X 3/4""" then

or use ASCII Chr(34)
 
Upvote 0
Well I tried that same problem ,

"compile Error
Expected: Then or Go To"

is is the message I get

thanks
 
Upvote 0
Well it didn't matter really about the code it seems it turns out the "x" is not the problem. It's the quotation marks, to fix it I removed the inches (") designation and it worked , thanks for your help.
 
Upvote 0

Forum statistics

Threads
1,214,788
Messages
6,121,577
Members
449,039
Latest member
Arbind kumar

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top