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: Extracting Range from worksheet and inserting into userform


Im am receiving the above error with the following code.

Dim iRow As String
Dim CustSSN As String

'Fill variable with User Inputed Cust. SSN
CustSSN = txtCustSSN

iRow = WorksheetFunction.Match(CustSSN
Worksheets("sheet1").Range("f:f300"), 0)
If iRow = 0 Then
MsgBox "Customer SSN Was Not Found"
Else
MsgBox "Record Found"

End If

End Sub

The error is highlighting the first line of the above code

--
Mcastee
-----------------------------------------------------------------------
Mcasteel's Profile: http://www.excelforum.com/member.php...fo&userid=1569
View this thread: http://www.excelforum.com/showthread.php?threadid=27226

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,272
Default Extracting Range from worksheet and inserting into userform

Line-wrap?

Dim iRow As String
Dim CustSSN As String

'Fill variable with User Inputed Cust. SSN
CustSSN = txtCustSSN

iRow = WorksheetFunction.Match(CustSSN, _
Worksheets("sheet1").Range("f:f300"), 0)
If iRow = 0 Then
MsgBox "Customer SSN Was Not Found"
Else
MsgBox "Record Found"

End If

End Sub



--

HTH

RP

"Mcasteel" wrote in message
...

Im am receiving the above error with the following code.

Dim iRow As String
Dim CustSSN As String

'Fill variable with User Inputed Cust. SSN
CustSSN = txtCustSSN

iRow = WorksheetFunction.Match(CustSSN,
Worksheets("sheet1").Range("f:f300"), 0)
If iRow = 0 Then
MsgBox "Customer SSN Was Not Found"
Else
MsgBox "Record Found"

End If

End Sub

The error is highlighting the first line of the above code.


--
Mcasteel
------------------------------------------------------------------------
Mcasteel's Profile:

http://www.excelforum.com/member.php...o&userid=15698
View this thread: http://www.excelforum.com/showthread...hreadid=272267



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
VBA: Extracting Range from worksheet and inserting into userform Mcasteel[_5_] Excel Programming 0 October 26th 04 03:42 PM
VBA: Extracting Range from worksheet and inserting into userform Mcasteel[_4_] Excel Programming 0 October 26th 04 01:31 PM
VBA: Extracting Range from worksheet and inserting into userform Mcasteel[_3_] Excel Programming 1 October 26th 04 12:52 PM
VBA: Extracting Range from worksheet and inserting into userform Mcasteel[_2_] Excel Programming 1 October 26th 04 09:18 AM
VBA: Extracting Range from worksheet and inserting into userform Mcasteel Excel Programming 1 October 25th 04 11:18 PM


All times are GMT +1. The time now is 09:37 PM.

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

About Us

"It's about Microsoft Excel"