Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default optionbutton in userform

One way is to take a picture of the userform, put that on a worksheet and
print the picture

This was posted by
"Orlando Magalhães Filho"



In a general module:


Declare Sub keybd_event Lib "user32" (ByVal bVk As Byte, _
ByVal bScan As Byte, ByVal dwFlags As Long, ByVal dwExtraInfo As Long)

Public Const VK_SNAPSHOT = &H2C

Sub Test()
UserForm1.Show
End Sub


In the userform module:


Private Sub CommandButton1_Click()
keybd_event VK_SNAPSHOT, 0, 0, 0
Workbooks.Add
Application.Wait Now + TimeValue("00:00:01")
ActiveSheet.PasteSpecial Format:="Bitmap", Link:=False,
DisplayAsIcon:=False
ActiveSheet.Range("A1").Select
ActiveWindow.SelectedSheets.PrintOut Copies:=1
ActiveWorkbook.Close False
End Sub

-------------------

So you would have a commandbutton on the userform that would trigger this
code. In the example, commandbutton1

--
Regards,
Tom Ogilvy



"Chico!! " wrote in message
...
I have a userform with many optionbuttons that employees will select.
My problem is when I print the form evreything is there
(text,date,comment) but the otptionbutton selections. I see the
otpionbuttons but the little black dot is missing so it's impossible
for people that use the hard copy to see what are the selections.

How can I make these black dots visible on a print?


---
Message posted from http://www.ExcelForum.com/



Reply
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
optionbutton - three options Sian Excel Discussion (Misc queries) 7 January 5th 08 10:29 AM
Optionbutton troubles Mats Samson Excel Worksheet Functions 2 September 27th 07 03:54 PM
OptionButton. Reset to 0 Eef Houniet New Users to Excel 7 September 3rd 06 12:14 PM
How Do I Tab From An OptionButton To A TextBox Minitman Excel Discussion (Misc queries) 0 February 23rd 05 09:34 PM
getting focus on an optionbutton Len Excel Programming 3 May 2nd 04 08:32 PM


All times are GMT +1. The time now is 04:41 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"