Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 72
Default Number/Text Formatting Issue

I have a Workbook "Case Prep File" that pulls information from another
workbook "Client List". I have written a macro (fired by commandbutton on
"Case Prep File") that opens an input box to enter a client number and then
compares that information to numbers in Column A on "Client List" to pull the
client information from the corresponding rows.

I am testing the code in step mode in VBEditor and I see that the number
entered into the input box "GIDInput" is the same number as the value for
....range("groupid"), except "groupid" has quotation marks around it. I
thought by adding the lines with the "@" into the code it would make the
numbers appear the same to the code.

It currently runs without any numbers matching the input. What am I doing
wrong?

Sub CommandButton5_Click()

Dim LastRow As Long
Dim GIDCell As Range, TMISCell As Range
Dim TMIS As Worksheet, CList As Worksheet
Dim Option1Label As MSForms.Label, Option2Label As MSForms.Label,
Option3Label
Dim GIDInput, GID, FN1, FN2, FN3, FN4, LN1, LN2, LN3, LN4, GIDCount, GIDRow
Set TMIS = ThisWorkbook.Sheets("Team Member Input Sheet")
Set CList = Workbooks("Client List.xls").Sheets(1)
Set GID = ThisWorkbook.Sheets("Team Member Input Sheet").Range("groupid")
Application.ScreenUpdating = False
Application.EnableEvents = False
LastRow = CList.Range("A" & Rows.Count).End(xlUp).Row
GIDInput = InputBox("What is the 11 digit GROUP ID (No Check Digit) of the
clients you are looking up?", "Client Search")
TMIS.Range("groupid").Value = GIDInput
TMIS.Range("groupid").NumberFormat = "@"
CList.Activate
Columns("A:A").NumberFormat = "@"
On Error GoTo ws_exit
GIDCount = 1
Load ClientSelForm
For Each GIDCell In CList.Range("A1", "A" & LastRow)
If GIDCell.Value = TMIS.Range("groupid").Value Then
If Range("D" & GIDCell.Row).Value = "" Then
TMIS.Range("FName" & GIDCount).Value = CList.Range("C" &
GIDCell.Row).Value
Else: TMIS.Range("FName" & GIDCount).Value = CList.Range("D" &
GIDCell.Row).Value
End If
TMIS.Range("LName" & GIDCount).Value = CList.Range("E" &
GIDCell.Row).Value
ClientSelForm.Controls("Option" & GIDCount & "Label").Caption =
Range("FName" & GIDCount).Value & " " & Range("LNname" & GIDCount).Value
End If
GIDCount = GIDCount + 1
Next GIDCell
ClientSelForm.Show
ws_exit:
Application.ScreenUpdating = True
Application.EnableEvents = True
End Sub
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
Issue with linked text box formatting skydiver Charts and Charting in Excel 0 April 20th 10 07:56 PM
Number Formatting Issue Cathy Landry Excel Worksheet Functions 1 January 20th 10 12:57 AM
Issue with Number Conversion to text Yuvaraj Mani Excel Worksheet Functions 0 October 15th 09 04:48 PM
Number Stored as Text Issue Raul Excel Programming 6 November 25th 08 01:57 PM
Number formatting issue Gayle Excel Worksheet Functions 2 August 8th 05 08:51 PM


All times are GMT +1. The time now is 10:03 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"