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 Issues

I have a workbook "Case Prep File" that holds this macro. Before running, I
open a second workbook "Client List". I am trying to run (using a
commandbutton) a macro that takes information from "Client List" and feeds it
into a Userform. The information that I enter into the Input Box should
match one (or more) numbers in "Client List", Column A.

As I test this macro (while stepping through it) I see that GIDInput value
is the number I enter, but TMIS.Range("groupid").value is the same number
with quotations around it. I thought that using "@" in the code will make
them of the format, but I think that isn't working correctly.

Help, please! (It runs through the whole list without ever entering the IF
statement, so I don't even know if that code works right either, so if you
see issues there, please help me out there too)




  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 72
Default Number/Text Issues

Here is the code..

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

"Shane" wrote:

I have a workbook "Case Prep File" that holds this macro. Before running, I
open a second workbook "Client List". I am trying to run (using a
commandbutton) a macro that takes information from "Client List" and feeds it
into a Userform. The information that I enter into the Input Box should
match one (or more) numbers in "Client List", Column A.

As I test this macro (while stepping through it) I see that GIDInput value
is the number I enter, but TMIS.Range("groupid").value is the same number
with quotations around it. I thought that using "@" in the code will make
them of the format, but I think that isn't working correctly.

Help, please! (It runs through the whole list without ever entering the IF
statement, so I don't even know if that code works right either, so if you
see issues there, please help me out there too)




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
Text Issues evoxfan Excel Discussion (Misc queries) 1 July 29th 09 09:18 PM
TEXT issues Jafferi[_2_] Excel Discussion (Misc queries) 2 May 4th 09 05:46 AM
Access Excel Linked Text and Number Issues Scott Excel Discussion (Misc queries) 2 October 4th 05 09:24 PM
Issues with Word Wrapping in cells after a number of characters Jig Bhakta Excel Discussion (Misc queries) 3 May 5th 05 10:36 PM
Number Format Issues-Decimal Places EXCELNCBOY Excel Worksheet Functions 1 November 4th 04 10:41 PM


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