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: 7
Default buttons on forms

Probably something really simple but.....

I am using a form to display questions and ask for responses ("true" &
"false" on command buttons).
the form initiallises ok and the first question is displayed (populating a
label(caption)using offset and related to a worksheet "questions" where the
questions are in a column)
The sub for the "True" button includes a call to a public sub in a module
which has the following:

------------------------------------------------------------------------------------------------
y = y + 1
x = x + 1

form.Caption = "Question " & x
q = ActiveCell.Offset(x, 0).Text

form!question.Caption = q
form!Label1.Caption = x 'test for increase in variabl
------------------------------------------------------------------------------------------------

x is set to 1 on 'workbook open' and is used to offset for the questions and
number the form

The problem is that the command button only works once and the variable 'x'
does not increase when "true" is hit (i.e. it stays at 1)

How do i reset it please?

--
Jabba
--
Jabba
 
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
Creating Buttons using the Forms Tool bar. MK Excel Worksheet Functions 1 April 4th 07 03:33 AM
Forms buttons Trebor Retrac Excel Discussion (Misc queries) 3 September 11th 06 05:37 PM
Forms Buttons for use with macro - recolorable? Ms. Tude New Users to Excel 1 February 20th 06 10:59 PM
User forms "back" buttons DavidObeid Excel Discussion (Misc queries) 1 June 22nd 05 09:07 AM
Option Buttons on User Forms ibeetb Excel Programming 1 October 30th 03 10:06 PM


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