Perry Choy


I want to get the cursor position of excel application range A1




Re: How to determine the cursor position to Excel range

ADG


Hi Perry

Not sure what you are asking, but the below moves the selection to A1 and prints the active cell address in A3.

Range("A1").Select
Worksheets("Sheet1").Cells(3, 1).Value = ActiveCell.Address






Re: How to determine the cursor position to Excel range

Perry Choy

I want to get the range A1:C10 area to capture the screen to save as a bitmap file. How can i do it Thanks!




Re: How to determine the cursor position to Excel range

Andy Pope

wow! would never have thought that was what you wanted from your first post Smile

To capture the range as an image use

range("A1:C10").CopyPicture xlScreen,xlBitmap

To do this manually select the range A1:C10 and the whilst holding the shift key use the menu Edit. You should see a new menu item Copy Picture. The dialog allows you to specify picture or bitmap, screen or printer version.





Re: How to determine the cursor position to Excel range

Perry Choy

If i need to save to a file, What should i do such as "C:\123.bmp"

Thank very much!





Re: How to determine the cursor position to Excel range

Andy Pope

There is no simple method to save the image to a file.

You can either save the worksheet as a webpage and pick out the generated image from the files created.

Or you can use a chartobject, which does have an export feature, to hold the image whilst exporting.

I have an addin which does this. The code is open so you can see how it is done.
http://www.andypope.info/vba/gex.htm





Re: How to determine the cursor position to Excel range

Perry Choy

I had found th result from the below link. Thank you very much!

http://www.dailydoseofexcel.com/index.php category_name=worksheet-functions/date-functions/&paged=1