Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 181
Default Print a user form image

I learn how to print a text as follows

Private Sub CommandButton3_Click()
Dim intOutFile As Integer 'number for the output file
intOutFile = FreeFile 'get a file number
Open "c:\temp\temp.txt" For Output As intOutFile
Print #intOutFile, Print_Dev.TextBox1.Text
Close intOutFile
Shell "c:\windows\notepad.exe /P c:\temp\temp.txt"
Kill "c:\temp\temp.txt" 'delete the file if desired
End Sub

Now I would like to print an image as well... I tried modifying this

Print #intOutFile, Print_Dev.TextBox1.Text

for this

Print #intOutFile, Print_Dev.image1.picture, Print_Dev.TextBox1.Text

but did not work... it just print a series of numbers.

Any idea?
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,565
Default Print a user form image

From VBA help file:

Private Sub UserForm_Click()
UserForm1.PrintForm
End Sub




"Alberto Ast" wrote in message
...
I learn how to print a text as follows

Private Sub CommandButton3_Click()
Dim intOutFile As Integer 'number for the output file
intOutFile = FreeFile 'get a file number
Open "c:\temp\temp.txt" For Output As intOutFile
Print #intOutFile, Print_Dev.TextBox1.Text
Close intOutFile
Shell "c:\windows\notepad.exe /P c:\temp\temp.txt"
Kill "c:\temp\temp.txt" 'delete the file if desired
End Sub

Now I would like to print an image as well... I tried modifying this

Print #intOutFile, Print_Dev.TextBox1.Text

for this

Print #intOutFile, Print_Dev.image1.picture, Print_Dev.TextBox1.Text

but did not work... it just print a series of numbers.

Any idea?



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 181
Default Print a user form image

Thanks... it does not print as good as previous function but it does it as
requeste...


"JLGWhiz" wrote:

From VBA help file:

Private Sub UserForm_Click()
UserForm1.PrintForm
End Sub




"Alberto Ast" wrote in message
...
I learn how to print a text as follows

Private Sub CommandButton3_Click()
Dim intOutFile As Integer 'number for the output file
intOutFile = FreeFile 'get a file number
Open "c:\temp\temp.txt" For Output As intOutFile
Print #intOutFile, Print_Dev.TextBox1.Text
Close intOutFile
Shell "c:\windows\notepad.exe /P c:\temp\temp.txt"
Kill "c:\temp\temp.txt" 'delete the file if desired
End Sub

Now I would like to print an image as well... I tried modifying this

Print #intOutFile, Print_Dev.TextBox1.Text

for this

Print #intOutFile, Print_Dev.image1.picture, Print_Dev.TextBox1.Text

but did not work... it just print a series of numbers.

Any idea?



.

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
user form image Atishoo Excel Programming 8 June 19th 09 02:43 PM
Use Loop to set Picture Property of image on User Form OzziePete Excel Programming 1 April 16th 09 11:25 AM
Print user form and add menu bar to the form Icy Excel Programming 2 January 27th 08 06:06 PM
animated image in user form Nayan Excel Programming 2 June 18th 07 05:16 PM
Image in user form [email protected] Excel Programming 2 March 30th 07 05:12 AM


All times are GMT +1. The time now is 03:34 PM.

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

About Us

"It's about Microsoft Excel"