Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Can someone tell me why I might be getting the "type mismatch" error when I
get to the second line? These numbers must be strings because they are a "label" for a store (like a store name), and the number that is entered by the user and is compared to these numbers later in this code is confirmed as a string in the other piece of code. Ideally, when a store number is entered by the user, VBA should determine if the store entered is out of the network based on its label (which is one of these 3 stores). Dim OutOfNetwork As String OutOfNetwork = Array("182", "244", "1457") I can get the correct result if I run thru a bunch of nested if or case statments, but I was hoping to keep the code short by having it only compare its value to the store in this array. Thank you for your insight! |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Array problem: Key words-Variant Array, single-element, type mismatch error | Excel Programming | |||
Array problem: Key words-Variant Array, single-element, type mismatch error | Excel Programming | |||
Help: Compile error: type mismatch: array or user defined type expected | Excel Programming | |||
setting ctl to array of checkboxes yields type mismatch error. | Excel Programming | |||
setting ctl to array of checkboxes yields type mismatch error. | Excel Programming |