• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 232
  • Last Modified:

Inserting pictures in a spreadsheet.


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

1 Solution
Eric ZwiekhorstCommented:
This is due to the fact that pictures are not directly linked to the cell you try to put them in.

sonmicAuthor Commented:
How can I solve it?
Saqib Husain, SyedEngineerCommented:
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.


Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now