ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Adding a border to a jpg image (https://www.excelbanter.com/excel-programming/297537-adding-border-jpg-image.html)

bob

Adding a border to a jpg image
 

This is a worksheet modual.


Is this code in a standard modual, or a class (ie form,
worksheet) modual?


ross




"Bob" wrote in
message ...
I have the following code:

Selection.ShapeRange.Fill.Visible = msoFalse
Selection.ShapeRange.Fill.Solid
Selection.ShapeRange.Fill.Transparency = 0#
Selection.ShapeRange.Line.Weight = 0.75
Selection.ShapeRange.Line.DashStyle = msoLineSolid
Selection.ShapeRange.Line.Style = msoLineSingle
Selection.ShapeRange.Line.Transparency = 0#
Selection.ShapeRange.Line.Visible = msoTrue
Selection.ShapeRange.Line.ForeColor.SchemeColor = 64
Selection.ShapeRange.Line.BackColor.RGB = RGB(255,
255, 255)
The problem is this code only works if it resides on

the
file with the image. If I have the code in my personal
folder the line "Selection.ShapeRange.Line.Style =
msoLineSingle" comes up with a error that the specified
value is out of range.

How can I fill the value so that I have a line border
around the jpg?

..



ross

Adding a border to a jpg image
 
Try calling it from a standard modual,


All times are GMT +1. The time now is 11:39 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com