Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 9
Default Looking for sample of VCR or Navigation buttons for use on UserForms

I am trying to create a userform and want to use some type of navagation
buttons for moving between records. I like the looks of the
RecordNavigationControl, but can find NO documentation for it.

I am looking for something that will move first/last next/prev. I would
also like a "slider" and a GOTO REC

Any suggestions?

Thanks


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Looking for sample of VCR or Navigation buttons for use on UserForms

add a scroll bar - use this as your slider
add four buttons

btnFirst '|<'
btnPrev '<'
btnNext ''
btnLast '|

add a horizontal scrollbar
sbSlider
add a label
lblRecordNumber SpecialEffect:=2 - sunken

add this code

Option Explicit
Private Record As Long
Private LastRecord As Long
Private Sub UserForm_Initialize()
'' populates key data
'for this demo
Record = 1
LastRecord = 100
With sbSlider
.Min = 1
.Max = LastRecord
.SmallChange = 1
.LargeChange = 10
End With
End Sub
Private Sub btnFirst_Click()
Record = 1
GetData
End Sub

Private Sub btnLast_Click()
Record = LastRecord
GetData
End Sub

Private Sub btnNext_Click()
If Record < LastRecord Then
Record = Record + 1
GetData
End If
End Sub

Private Sub btnPrev_Click()
If Record 1 Then
Record = Record - 1
GetData
End If
End Sub
Private Sub sbSlider_Change()
Record = sbSlider.Value
GetData
End Sub

Private Sub GetData()
sbSlider.Value = Record

'''load data for Record
lblIRecordNumber.Caption = Record
End Sub


This demo shows the selected record number in the label.
It shows how to test for the first & last, and it sets
the value of the scrollbar according to the record buttons
The GetData procedure simply places the record number
into the label. It should quite easy to add boxes for
other data & use this to populate them
Use the form's initialise procedure to set up the min,
max etc as I have done.

demo file available - email me directly

Patrick Molloy
Microsoft Excel MVP




-----Original Message-----
I am trying to create a userform and want to use some

type of navagation
buttons for moving between records. I like the looks of

the
RecordNavigationControl, but can find NO documentation

for it.

I am looking for something that will move first/last

next/prev. I would
also like a "slider" and a GOTO REC

Any suggestions?

Thanks


.

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 9
Default Looking for sample of VCR or Navigation buttons for use on UserForms

Using this approach, how do I position the activecell to the "record" in the
getdata?
This method would REALLY make my life easier!!!

Thanks







"Patrick Molloy" wrote in message
...
add a scroll bar - use this as your slider
add four buttons

btnFirst '|<'
btnPrev '<'
btnNext ''
btnLast '|

add a horizontal scrollbar
sbSlider
add a label
lblRecordNumber SpecialEffect:=2 - sunken

add this code

Option Explicit
Private Record As Long
Private LastRecord As Long
Private Sub UserForm_Initialize()
'' populates key data
'for this demo
Record = 1
LastRecord = 100
With sbSlider
.Min = 1
.Max = LastRecord
.SmallChange = 1
.LargeChange = 10
End With
End Sub
Private Sub btnFirst_Click()
Record = 1
GetData
End Sub

Private Sub btnLast_Click()
Record = LastRecord
GetData
End Sub

Private Sub btnNext_Click()
If Record < LastRecord Then
Record = Record + 1
GetData
End If
End Sub

Private Sub btnPrev_Click()
If Record 1 Then
Record = Record - 1
GetData
End If
End Sub
Private Sub sbSlider_Change()
Record = sbSlider.Value
GetData
End Sub

Private Sub GetData()
sbSlider.Value = Record

'''load data for Record
lblIRecordNumber.Caption = Record
End Sub


This demo shows the selected record number in the label.
It shows how to test for the first & last, and it sets
the value of the scrollbar according to the record buttons
The GetData procedure simply places the record number
into the label. It should quite easy to add boxes for
other data & use this to populate them
Use the form's initialise procedure to set up the min,
max etc as I have done.

demo file available - email me directly

Patrick Molloy
Microsoft Excel MVP




-----Original Message-----
I am trying to create a userform and want to use some

type of navagation
buttons for moving between records. I like the looks of

the
RecordNavigationControl, but can find NO documentation

for it.

I am looking for something that will move first/last

next/prev. I would
also like a "slider" and a GOTO REC

Any suggestions?

Thanks


.



  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 9
Default Looking for sample of VCR or Navigation buttons for use on UserForms

DOLT!!!!!

Range(record).Select

Silly me!


"Phillips" wrote in message
news:jytLb.4171$5V2.10163@attbi_s53...
Using this approach, how do I position the activecell to the "record" in

the
getdata?
This method would REALLY make my life easier!!!

Thanks







"Patrick Molloy" wrote in message
...
add a scroll bar - use this as your slider
add four buttons

btnFirst '|<'
btnPrev '<'
btnNext ''
btnLast '|

add a horizontal scrollbar
sbSlider
add a label
lblRecordNumber SpecialEffect:=2 - sunken

add this code

Option Explicit
Private Record As Long
Private LastRecord As Long
Private Sub UserForm_Initialize()
'' populates key data
'for this demo
Record = 1
LastRecord = 100
With sbSlider
.Min = 1
.Max = LastRecord
.SmallChange = 1
.LargeChange = 10
End With
End Sub
Private Sub btnFirst_Click()
Record = 1
GetData
End Sub

Private Sub btnLast_Click()
Record = LastRecord
GetData
End Sub

Private Sub btnNext_Click()
If Record < LastRecord Then
Record = Record + 1
GetData
End If
End Sub

Private Sub btnPrev_Click()
If Record 1 Then
Record = Record - 1
GetData
End If
End Sub
Private Sub sbSlider_Change()
Record = sbSlider.Value
GetData
End Sub

Private Sub GetData()
sbSlider.Value = Record

'''load data for Record
lblIRecordNumber.Caption = Record
End Sub


This demo shows the selected record number in the label.
It shows how to test for the first & last, and it sets
the value of the scrollbar according to the record buttons
The GetData procedure simply places the record number
into the label. It should quite easy to add boxes for
other data & use this to populate them
Use the form's initialise procedure to set up the min,
max etc as I have done.

demo file available - email me directly

Patrick Molloy
Microsoft Excel MVP




-----Original Message-----
I am trying to create a userform and want to use some

type of navagation
buttons for moving between records. I like the looks of

the
RecordNavigationControl, but can find NO documentation

for it.

I am looking for something that will move first/last

next/prev. I would
also like a "slider" and a GOTO REC

Any suggestions?

Thanks


.





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
Navigation buttons in Excel 2007 I Teach Excel Discussion (Misc queries) 1 June 5th 10 03:32 PM
Creating navigation buttons on a worksheet ryan_dude New Users to Excel 2 December 20th 05 05:15 PM
Navigation Buttons not working (HTML) Mariusz K Excel Discussion (Misc queries) 0 October 18th 05 04:37 PM
UserForms setting radio buttons [email protected] Excel Programming 1 November 1st 03 12:53 AM
RollOver buttons in UserForms (A solution) Pierre Archambault Excel Programming 2 July 9th 03 04:07 PM


All times are GMT +1. The time now is 10:16 AM.

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"