Help creating a check box on a form.

A

artemisia

I need a little help please.

I am creating a work order and thought it would be nice to be able t
write up the order online. In order to do this, I need to be able t
check if a certain item is to be installed. I thought the check bo
feature would work nicely.

There would be 12 check boxes on the form. I know how to insert th
checkbox; I just don't know how to write the code. The sheet will b
password protected, and I need to be able to select which items are t
be installed.

If you are reading this post, and know how to do this, I woul
appreciate your assistance.

Thanks

artemisia
:
 
C

Charles

art,

try something like this. you will need to modify to your needs.

Sub test_checkbox()
Application.ScreenUpdating = False
Worksheets("sheet1").Activate
If ActiveSheet.[Check Box 4].Value = 1 Then
MsgBox "hi"
End If
End Sub


HTH

Charle
 
A

artemisia

No that did not work for me.

Do you know of a web site that gives examples or has templates fo
Excel?

If I post the worksheet online or send it to you could you fix it fo
me. LO
 
A

artemisia

Hey Charles,
I was able to get the check box to work now; however, I have anothe
questions for you.

Is it possible to do something so that 3 pages of the workbook print s
you don't have to go into File | Print | every time you need to prin
the work order?

Is it possible to put a button on the first page that when you click i
it will automatically print 3 pages?

Thanks again.

artemisi
 
C

Charles

Art,
Create a worksheet button on the worksheet and asign a macro to it.
The macro below is a simple form, but it should work. It will print th
first 3 worksheets.
You can change the sheet1 to the name of your worksheet.


Sub test_print()
Application.ScreenUpdating = False
Worksheets("Sheet1").PrintOut COPIES:=1
Worksheets("Sheet2").PrintOut COPIES:=1
Worksheets("Sheet3").PrintOut COPIES:=1

End Sub


HTH

Charle
 
A

artemisia

Hello Charles:

Thanks and sorry for getting back to you so late. I went to Epcot ove
the weekend. Anyway, I did what you suggested.
I created a button and then put the code between these two lines

Private Sub CommandButton1_Click()

Sub test_print()
Application.ScreenUpdating = False
Worksheets("Sheet1").PrintOut COPIES:=1
Worksheets("Sheet2").PrintOut COPIES:=1
Worksheets("Sheet3").PrintOut COPIES:=1

End Sub

Like this.

YUCK... it didn't work.

The debug said there was an expected sub error.

Have any other suggestions.


Thank
 
C

Charles

Art,
Sorry it was yuck, reason is I some how put a sub with in a comman
buton any way sorry. try this. this should work as long as there i
info on the sheets to be printed.



Private Sub CommandButton1_Click()

Application.ScreenUpdating = False
Worksheets("Sheet1").PrintOut COPIES:=1
Worksheets("Sheet2").PrintOut COPIES:=1
Worksheets("Sheet3").PrintOut COPIES:=1

End Sub


Charle
 
Top