Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 30
Default insert from paint & resize

Hi

I hope someone can help with this. I use the code below which launches MS Paint, the user then signs within Paint (using the Touchpad on a laptop) the macro then closes Paint and the signature is placed in cell B39.

BUT . . . whatever I've tried it is never sized correctly - the graphic is usually too deep (the height of it is too high, so it's deeper than row 39 and 40). I've tried using the "Height" and "Width" options (and the top & left options) but they place the object in cell A1. The Sendkeys lines in the code work OK to get the box in and at a decent size but always

I've also tried using vba to adjust the row heights before and after the object is inserted and it's still not quite right. So near and yet, so far . .. .

any help greatly appreciated!

Steve




Range("B39").Select

Set SigPic = ActiveSheet.OLEObjects.Add(ClassType:="Paint.Pictu re", Link:=False, DisplayAsIcon:=False).Activate
SendKeys "%f"
SendKeys "%e"
SendKeys "%i"
SendKeys "%w"
SendKeys "4.25"
SendKeys "{TAB}"
SendKeys "1"
SendKeys "{Enter}"
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
Insert image from paint Ryan H Excel Programming 2 October 16th 09 07:38 PM
How do I insert and resize a column on only one worksheet page? gottaknow Excel Discussion (Misc queries) 4 September 30th 09 11:46 AM
Macro to insert multiple images at specific cells and resize all i Mike Charlie Charlie Excel Programming 1 August 18th 08 02:50 AM
Insert, position, and resize a picture w/ Macro John Excel Discussion (Misc queries) 1 July 10th 07 07:21 PM
auto resize when insert large image to excel sajid Excel Worksheet Functions 4 November 21st 06 03:40 PM


All times are GMT +1. The time now is 06:07 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"