Inserting pictures in a spreadsheet.

Hi,

I set in a macro a column width : ws.Columns(lngCol).ColumnWidth = Range("kWb")
Range("kWb") is in my parameters is 42,57 and my column width will be set to about 6,5 cm or 2.6 inch. This is OK.
But when I use the same instruction “ws.Columns(lngCol).ColumnWidth - 5” in another macro then he set the picture on the left site in the cell (about 1,5cm or 0.6 inch from the left).
I’am confused, I only want to place several pictures along each other in a cell.
e.g. pic1 : left 10 / width 5
       pic2 : left 15 / width 8
       pic3 : left 23 / width 6
       etc

Tx
sonmicAsked:
Who is Participating?
 
Saqib Husain, SyedConnect With a Mentor EngineerCommented:
I am not sure I am fully with you but you can try something like

ws.Columns(lngCol).left +ws.Columns(lngCol).ColumnWidth - 5

If this does not solve your problem then upload your code and we shall try to assist.

Saqib
0
 
Eric ZwiekhorstSAP Business ConsultantCommented:
This is due to the fact that pictures are not directly linked to the cell you try to put them in.

0
 
sonmicAuthor Commented:
How can I solve it?
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.