View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
joel joel is offline
external usenet poster
 
Posts: 9,101
Default range and visibility

Private Sub CommandButton2_Click()
Application.Goto Reference:=Worksheets("Questions").Range("B2"), _
scroll:=True
End Sub

To clear a sheet use

Worksheets("Questions").cells.clear


"Tanya" wrote:

Hi
I am trying to create a jeopardy game for school students to demonstrate
topic knowledge in Excel and don't have a lot of experience with macros. If
anyone would like to help me I would be grateful and happy to include their
name in the credits.

The sheets are running well as far as formula's. What I wold like to do is
run a macro from a command button which takes the player to sheet "Questions"
at a particular cell reference relative to the button selected i.e.
Commandbutton1 linked to Questions!B2

In addition to this I would like the commandbutton to become invisible.

I came up with this code to take the player to a particular cell, but it
isn't working and have no idea where to begin with changing the properties on
the commandbutton itself:

Private Sub CommandButton2_Click()

Sheets("Questions").Select
Range("B2").Select


End Sub

The second thing I would like to achieve is to have a commandbutton to reset
the workbook to how it looked at startup. i.e. void of any values
input/changes etc.

Any support is greatly appreciated and if anyone would like a copy of the
finished product to play with they can contact me off list.


Cheers
Tanya