"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
 

Some videos you may like

Excel Facts

Does the VLOOKUP table have to be sorted?
No! when you are using an exact match, the VLOOKUP table can be in any order. Best-selling items at the top is actually the best.

sheetspread

Well-known Member
Joined
Sep 19, 2005
Messages
5,119
Put some more quotes in, like maybe:

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

or use ASCII Chr(34)
 

MarkJ3301

New Member
Joined
Feb 3, 2014
Messages
3
Well I tried that same problem ,

"compile Error
Expected: Then or Go To"

is is the message I get

thanks
 

MarkJ3301

New Member
Joined
Feb 3, 2014
Messages
3
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.
 

Watch MrExcel Video

Forum statistics

Threads
1,122,207
Messages
5,594,843
Members
413,944
Latest member
3xc3ln00b

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
Top