User Form

  • Thread starter Thread starter Tim
  • Start date Start date
T

Tim

Hello All,

I am trying to create a help form with "Next"
and "Previous" buttons. My form consists of 12 separate
images. I will use a list box to move through the images
(I think I can handle that part). I have the
userForm "activate" hiding all my images except the title
when opened. I need to identify the image that is
visible when the "Next" or "Previous" is clicked so I can
cycle to the next. My images are named img1, img2, etc.

Thanks in advance
 
Hi

Declare a variable outside the subs for that. Replace the Msgbox'es with
something useful:

Dim Limage As Long

Private Sub CommandButton1_Click()
If Limage > 1 Then Limage = Limage - 1
MsgBox Limage
End Sub

Private Sub CommandButton2_Click()
If Limage < 12 Then Limage = Limage + 1
MsgBox Limage
End Sub

HTH. Best wishes Harald
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top