LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 31
Default Fill combox box from text file

I use the following code to store one name. I would like to store multiple
user entered names and have them usable in a combo box on a quote worksheet.
can someone please help.
Sub SMan()
On Error GoTo ErrorHandler

One:
Open "c:\Program Files\Toyota Quotemaster\Sman.txt" For Input As #1
Input #1, X
Close #1
X = X

Two:
Sheets(1).Range("SMan").Value = X
Open "c:\Program Files\Toyota Quotemaster\Sman.txt" For Output As #1
Write #1, X
Close #1

Exit Sub
ErrorHandler:
Select Case Err.Number
Case 53 'If Counter file does not exist...
X = InputBox("Enter Salesperson's Name to appear on Quotes",
"Create 'Name' File")
Resume Two
Case Else
Resume Next
End Select


End Sub
Sub ChangeSman()
On Error Resume Next
Kill "C:\Program Files\Toyota Quotemaster\Sman.txt"
SMan
ChangeSalesTitle

End Sub
--
AJM1949
 
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
combox question Gary Keramidas Excel Programming 3 August 17th 06 11:57 PM
Fill listbox with data from file text Pavu Excel Programming 1 April 6th 06 01:58 PM
Combox Box and 3 worksheets craig456[_2_] Excel Programming 0 March 24th 06 03:07 PM
Combox Locking D.Parker Excel Discussion (Misc queries) 2 April 27th 05 11:03 PM
Combox box question David Goodall Excel Programming 2 April 22nd 04 08:16 AM


All times are GMT +1. The time now is 07:00 AM.

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"