simulate a key press in Excel

vinnie881

Well-known member
Joined
Sep 3, 2006
Messages
152
Programming Experience
3-5
*****EDITED***
ANSWER IS:
VB.NET:
dim _wbdoc as new excel.workbook
_wbdoc.Windows(1).Zoom = 20  ' can be any number from 10 -400

Programically Zoom Magnification of Excel useing the Excel Object Library.

***Original Question
I have an app where I need to simulate holding the ctrl key and clicking the middle mouse button.

I have the middle mouse button done, but how do I simulate the ctrl key being held down, then release it when I am done?


Thanks
 
Last edited:
I was trying that earlier, the issue is I need to press and hold, then release.

Basically all I need to do is zoom in and out, so what I am trying to replicate is if you hold your ctrl button down, then move your middle mouse button up and down, you'll see your web page get larger and smaller.

There might be another way to do this.
 
What I am looking to do is zoom into my excel doc programatically.


If you are in excel and hold your ctrl key down and go up or down with the mouse wheel, you can do this. I want to be able to that command programically.
 
Back
Top