Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Frame captions aren't printing when the userform is printed
I have a nice user form with a command button on it that (when clicked)
prints the form. On the user form are five frames, each with a caption. These captions show as they should when the form is on the screen, but they are not on the printout. I've checked the Frame properties and can't find anything that would keep the frame captions from printing out. The code for the command button simply says "UserForm2.PrintForm". Any suggestions? |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Frame captions aren't printing when the userform is printed
Are you sure it's not the printer itself?
Maybe you can change your default printer and see if that makes a difference??? Luke wrote: I have a nice user form with a command button on it that (when clicked) prints the form. On the user form are five frames, each with a caption. These captions show as they should when the form is on the screen, but they are not on the printout. I've checked the Frame properties and can't find anything that would keep the frame captions from printing out. The code for the command button simply says "UserForm2.PrintForm". Any suggestions? -- Dave Peterson |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Frame captions aren't printing when the userform is printed
Not sure what's causing the problem, but this might help. I found this Tom
Ogilvy post on Google. It copies the userform to a worksheet in a new workbook, prints it from there, then closes the new workbook. 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 = 44 Public Const VK_LMENU = 164 Public Const KEYEVENTF_KEYUP = 2 Public Const KEYEVENTF_EXTENDEDKEY = 1 In the userform module: Private Sub CommandButton1_Click() ' keybd_event VK_SNAPSHOT, 0, 0, 0 DoEvents keybd_event VK_LMENU, 0, KEYEVENTF_EXTENDEDKEY, 0 keybd_event VK_SNAPSHOT, 0, KEYEVENTF_EXTENDEDKEY, 0 keybd_event VK_SNAPSHOT, 0, KEYEVENTF_EXTENDEDKEY + _ KEYEVENTF_KEYUP, 0 keybd_event VK_LMENU, 0, KEYEVENTF_EXTENDEDKEY + _ KEYEVENTF_KEYUP, 0 DoEvents 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 Hope this helps, Hutch "Luke" wrote: I have a nice user form with a command button on it that (when clicked) prints the form. On the user form are five frames, each with a caption. These captions show as they should when the form is on the screen, but they are not on the printout. I've checked the Frame properties and can't find anything that would keep the frame captions from printing out. The code for the command button simply says "UserForm2.PrintForm". Any suggestions? |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Userform Captions | Excel Programming | |||
Freeze frame printing | Excel Worksheet Functions | |||
Getting PrintForm to print all Frame Captions | Excel Programming | |||
VBA - Printing a frame | Excel Programming | |||
userform frame control | Excel Programming |