Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,934
Default Align picture to the right side of a cell...

Try it this way...

Dim myPict As Picture
With ActiveSheet.Range("B5")
Set myPict = .Parent.Pictures.Insert("C:\jorge\jorge.jpg")
myPict.Top = .Top + .Height - myPict.Height
myPict.Left = .Left + .Width - myPict.Width
myPict.Placement = xlMoveAndSize
End With

I note (because you are using a cell near the edge of the worksheet) that if
aligning the picture to the cell would make part of the picture go out of
the worksheet, the picture will be moved so that all of it is in the
worksheet.

--
Rick (MVP - Excel)


"SpeeD" wrote in message
...
Hi to all...

I need to align a picture to the right side of a cell, but i cant make
this
work.. i can do it to the left...

Dim myPict As Picture
With ActiveSheet.Range("B5")
Set myPict = .Parent.Pictures.Insert("C:\jorge\jorge.jpg")
myPict.Top = .Top
myPict.Left = .Left
myPict.Placement = xlMoveAndSize

This is an insert code, but you get the picture...

Can anyone help me?

Thanks in advance
SpeeD


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
Howto: Align print-out to the right side of paper Sloth Excel Discussion (Misc queries) 1 May 9th 08 06:58 PM
Align cell contents on left side of sheet? wannabe68 New Users to Excel 1 August 6th 07 09:03 PM
Align a picture/shape in the middle of a range("A1:H10") Andoni[_21_] Excel Programming 1 August 27th 04 07:44 AM
Align a picture/shape in the middle of a range("A1:H10") Andoni[_20_] Excel Programming 0 August 25th 04 11:09 PM
align a picture/shape in a Range! Andoni[_18_] Excel Programming 1 August 22nd 04 06:11 PM


All times are GMT +1. The time now is 08:25 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"