Camera Tool

C

Christina

Hello All,

I Have a problem of using Excel Camera command in my macro. Here is my codes:

ActiveSheet.Range("A4:H15").Select
Selection.Copy
ActiveSheet.Pictures.Add(201.75, 192.75, 375, 328.5).Select
Selection.Height = 294
Selection.Width = 410.25

It works well in most of my computer. However, I have a problem in one
computer. The content of the range A4:H15 that I size it to fit with the
width 410.25 and the height = 294 is larger than the normale and it also move
a little to the left. I think the problem is from the printer configuration
but I do not know which part. Any clue will be very appreciated.

Christine
 
J

Jim Rech

If I follow you correctly I think you should do something like this:

Selection.Height = Range("A4:H15").Height
Selection.Width = Range("A4:H15").Width

--
Jim
| Hello All,
|
| I Have a problem of using Excel Camera command in my macro. Here is my
codes:
|
| ActiveSheet.Range("A4:H15").Select
| Selection.Copy
| ActiveSheet.Pictures.Add(201.75, 192.75, 375, 328.5).Select
| Selection.Height = 294
| Selection.Width = 410.25
|
| It works well in most of my computer. However, I have a problem in one
| computer. The content of the range A4:H15 that I size it to fit with the
| width 410.25 and the height = 294 is larger than the normale and it also
move
| a little to the left. I think the problem is from the printer
configuration
| but I do not know which part. Any clue will be very appreciated.
|
| Christine
 
C

Christina

Hi Jim,

Hi Jim,
The problem is not the syntax error but it is is possible from the setting
of the printer on each computer. On the computer that I have problem the
picture selected from the Camera is no more proportion with the page. It is
bigger and not at the right position. However, on all of my others computers,
the picture is at the right position.
Christine
 
J

Jim Rech

Sorry my point wasn't clear. I don't recall saying anything about a syntax
error. Your problem is that you are hard wiring coordinates on the
assumption that they hold across machines. You have to determine them
dynamically. My code (I cannot tell if you tried it) dynamically determines
the size (as best I can tell what you're doing) but not the location.
Something like this: 201.75, 192.75, 375, 328.5 is a nonstarter. Use
Range("B10").Left, Range("B10").Top, etc.

--
Jim
| Hi Jim,
|
| Hi Jim,
| The problem is not the syntax error but it is is possible from the setting
| of the printer on each computer. On the computer that I have problem the
| picture selected from the Camera is no more proportion with the page. It
is
| bigger and not at the right position. However, on all of my others
computers,
| the picture is at the right position.
| Christine
|
| "Jim Rech" wrote:
|
| > If I follow you correctly I think you should do something like this:
| >
| > Selection.Height = Range("A4:H15").Height
| > Selection.Width = Range("A4:H15").Width
| >
| > --
| > Jim
| > | > | Hello All,
| > |
| > | I Have a problem of using Excel Camera command in my macro. Here is my
| > codes:
| > |
| > | ActiveSheet.Range("A4:H15").Select
| > | Selection.Copy
| > | ActiveSheet.Pictures.Add(201.75, 192.75, 375, 328.5).Select
| > | Selection.Height = 294
| > | Selection.Width = 410.25
| > |
| > | It works well in most of my computer. However, I have a problem in one
| > | computer. The content of the range A4:H15 that I size it to fit with
the
| > | width 410.25 and the height = 294 is larger than the normale and it
also
| > move
| > | a little to the left. I think the problem is from the printer
| > configuration
| > | but I do not know which part. Any clue will be very appreciated.
| > |
| > | Christine
| >
| >
| >
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top