![]() |
Checkbox problems
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! -- Best regards Mia |
Checkbox problems
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 "Mia" wrote in message ... 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! -- Best regards Mia |
Checkbox problems
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. -- Cheers, Ryan "Mia" wrote: 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! -- Best regards Mia |
All times are GMT +1. The time now is 05:24 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com