Checkbox problems

M

Mia

Hi,

I don't get my checkbox to work. Do anyone know whats wrong with my code?

Sub Utskrift()

Application.ScreenUpdating = False

Utskriftsfunktion.Show

If canc = 4 Then Exit Sub

If canc = 5 Then

If CheckBox3 = True Then Call fakturapdf

If CheckBox4 = True Then Call specpdf

If CheckBox2 = True Then Call specprint

If CheckBox1 = True Then Call fakturaprint

Sheets("Indata").Select

Application.ScreenUpdating = True

End if

End Sub

I'll be wery grateful if someone can help me!
 
P

Peter T

I assume your Checkboxes are ActiveX controls on the active sheet. Unless
your code is in the worksheet module, your use of Checkbox# needs be
qualified with a reference to the relevant sheet, eg

If ActiveSheet.CheckBox3 = True Then

or

If ActiveSheet.OLEObjects("CheckBox1").Object = True Then

In passing, the way your code is constructed your code might complete
without resetting Screenupdating.

Regards,
Peter T
 
R

Ryan H

You post is kind of vague. Is Utskriftsfunktion a Userform? And the
checkboxes and canc are on the userform? What is canc? Is it a combobox?
Please describe what you're this code is suppose to do vs. just saying it
doesn't work.
 

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

Top