Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,272
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,824
Default 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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Open new record with selected fields from previous record Design by Sue Excel Discussion (Misc queries) 1 June 12th 09 02:24 PM
Find record by multi criteria in userform MP Excel Discussion (Misc queries) 0 November 3rd 08 04:01 PM
VBA: Pull Record Into UserForm Mcasteel[_7_] Excel Programming 2 October 26th 04 06:27 PM
VBA: Pull Record Into UserForm Mcasteel[_9_] Excel Programming 0 October 26th 04 06:00 PM
pull down menu on userform Tom Ogilvy Excel Programming 4 August 13th 03 12:49 AM


All times are GMT +1. The time now is 12:51 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"