Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 7
Default Link Next button to ComboBox

Hi,

Excel 2003.

I have a ComboBox allowing the user to select an item number from a
dropdown, after which a number of other ComboBoxes on UserForm1 are
populated.

I have the following code:
General Declaration:

Option Explicit

Public iRow As Long ' = ActiveCell.Row


Code attached to ComboBox1:
Private Sub ComboBox1_Change()
' Retrieve data previously entered
Dim sh As Worksheet
Dim FndRng As Range
Dim i As Long
If Me.ComboBox1.MatchFound Then
' Populate CAR data in UserForm
Set sh = ThisWorkbook.Sheets("Data")
Set FndRng = sh.Columns(1).Find(Me.ComboBox1.Value, , , xlWhole)
Me.TextBox1.Value = FndRng.Offset(0, 1).Value
Etc. etc
End Sub

Also on the UserForm I have a "Next" button.

Code attached to "Next" button:
Private Sub CommandButton4_Click()
iRow = iRow + 1
ComboBox1.Value = Sheets("Data").Cells(iRow, 1).Value
Etc. etc
Me.Caption = "CAR " & iRow - 1
If iRow 1 Then CommandButton4.Enabled = True
End Sub

At the moment if the "Next" button is clicked Row 1 data is returned,
then
Row 2 data etc with each click.

What I would like to do is enable ComboBox1 to either allow user
selection
of a number or increment the selected number each time the "Next"
button is
clicked.

E.g.
User selects say number 10 from ComboBox1 (other ComboBoxes are
populated).
User clicks "Next" button - ComboBox1 value becomes 11 and other
ComboBoxes
are populated.

User clicks "Next" button again - ComboBox1 value becomes 12 and
other
ComboBoxes are populated

Any assistance appreciated

Cheers

Bob.

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
ComboBox - Link Cell that Accumulates LaRana! Excel Worksheet Functions 1 July 27th 07 09:52 PM
link form combobox hngo Excel Worksheet Functions 0 July 28th 06 03:38 PM
link to combobox legepe Excel Discussion (Misc queries) 4 July 26th 06 04:45 PM
copy combobox - cell link to change automatically Bojana Excel Worksheet Functions 1 June 8th 05 02:35 PM
Reverse link ComboBox? Zurn[_12_] Excel Programming 0 September 28th 04 02:31 PM


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