Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
VBA: Pull Record Into UserForm
I have 3 more questions for you regarding your solution. 1. SSN The SSN column is formatted as "Special" / Social Security Number i the Excel file. When viewing the SSN: it shows with dashes (123-45-6789) but if I pul the value from Excel into the form as a string it displays with out th dashes (123456789) which suites my needs. After the above experiment Im assuming the ssn is just a string or tex and not a number. 2. Im not sure If I understand your last line of code, what is the Cln used for? iRow = whateveryouchose.match_(*CLNG*(_CustSSN), _ Worksheets("Sheet1").Range("f27:f307"), 0) 3. With this piece of code, I will be able to take values from th record and display them in my form, correct? Thanks again, Im working on trying your code right now -- Mcastee ----------------------------------------------------------------------- Mcasteel's Profile: http://www.excelforum.com/member.php...fo&userid=1569 View this thread: http://www.excelforum.com/showthread.php?threadid=27247 |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Pull Record Into UserForm
1. No that means it is a number, it is just the format that adds the -
2. Clng is coercing it into number in case it is a string. 3. Yes, but you only get the row where a match is found, you still have work to do. -- HTH RP "Mcasteel" wrote in message ... I have 3 more questions for you regarding your solution. 1. SSN The SSN column is formatted as "Special" / Social Security Number in the Excel file. When viewing the SSN: it shows with dashes (123-45-6789) but if I pull the value from Excel into the form as a string it displays with out the dashes (123456789) which suites my needs. After the above experiment Im assuming the ssn is just a string or text and not a number. 2. Im not sure If I understand your last line of code, what is the Clng used for? iRow = whateveryouchose.match_(*CLNG*(_CustSSN), _ Worksheets("Sheet1").Range("f27:f307"), 0) 3. With this piece of code, I will be able to take values from the record and display them in my form, correct? Thanks again, Im working on trying your code right now. -- Mcasteel ------------------------------------------------------------------------ Mcasteel's Profile: http://www.excelforum.com/member.php...o&userid=15698 View this thread: http://www.excelforum.com/showthread...hreadid=272475 |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
VBA: Pull Record Into UserForm
Just to add to Bob's response.
#1. It looked like you were using some sort of textbox to ask the user what the SSN to retrieve. That value in the textbox is text--so you have to make it match the values (which are numbers formatted pretty) in your data--hence, the clng() portion. #2. see #1 <bg. #3. Maybe <vbg. Mcasteel wrote: I have 3 more questions for you regarding your solution. 1. SSN The SSN column is formatted as "Special" / Social Security Number in the Excel file. When viewing the SSN: it shows with dashes (123-45-6789) but if I pull the value from Excel into the form as a string it displays with out the dashes (123456789) which suites my needs. After the above experiment Im assuming the ssn is just a string or text and not a number. 2. Im not sure If I understand your last line of code, what is the Clng used for? iRow = whateveryouchose.match_(*CLNG*(_CustSSN), _ Worksheets("Sheet1").Range("f27:f307"), 0) 3. With this piece of code, I will be able to take values from the record and display them in my form, correct? Thanks again, Im working on trying your code right now. -- Mcasteel ------------------------------------------------------------------------ Mcasteel's Profile: http://www.excelforum.com/member.php...o&userid=15698 View this thread: http://www.excelforum.com/showthread...hreadid=272475 -- Dave Peterson |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Open new record with selected fields from previous record | Excel Discussion (Misc queries) | |||
Find record by multi criteria in userform | Excel Discussion (Misc queries) | |||
VBA: Pull Record Into UserForm | Excel Programming | |||
VBA: Pull Record Into UserForm | Excel Programming | |||
pull down menu on userform | Excel Programming |