+ Reply to Thread
Results 1 to 2 of 2

Reconciling units: Column width and image width

  1. #1
    Registered User
    Join Date
    09-08-2014
    Location
    -
    MS-Off Ver
    -
    Posts
    68

    Reconciling units: Column width and image width

    Hi there ladies and gents,
    I have a tab in my workbook which stores various images.
    Each of these images will have a height of 300 points, with the width scaling automatically.
    The only columns on this sheet that are visible are columns A and B - I'd rather keep it that way.
    However, obviously excel can get a bit funny if you try to shift shapes off the sheet. Therefore, before inserting the image I have to ensure that the width of Column A + width of column B does not exceed the width of the photo - and it it does, to adjust the width of column B.
    Furthermore, once this is done, none of the other images will be in the center - so I'd want it to loop through each of the images and adjust the Shape.Left property to reposition it

    Adjusting the positioning of each image works out beautifully. However, I can't seem to get the bit which adjusts column widths working.
    Here's the code I've got:
    Please Login or Register  to view this content.
    I assume it's because column width can't exceed 255 characters and when I demand a column width of 373 for example it's trying to do that in characters instead of points.

    I hope this kind of makes sense. Any suggestions?
    Thanks,
    Lady Marmalade

  2. #2
    Forum Expert Greg M's Avatar
    Join Date
    08-16-2007
    Location
    Dublin. Ireland
    MS-Off Ver
    Office 2016
    Posts
    4,481

    Re: Reconciling units: Column width and image width

    Hi again,

    Hope your PrintPreview routine is still working correctly!

    Here's a kneejerk response - try using:

    Please Login or Register  to view this content.
    Hope this helps - please let me know how you get on.

    Regards,

    Greg M

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Replies: 2
    Last Post: 07-30-2014, 11:13 AM
  2. [SOLVED] Merged Cell column width vs single cell column width
    By ratdogexcel in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 02-28-2014, 12:23 AM
  3. Unable to change image height, width, left, top in PowerPoint 2013
    By kevin14 in forum PowerPoint Formatting & General
    Replies: 3
    Last Post: 02-06-2014, 04:52 PM
  4. Column Width vs. Text Width
    By jlt199 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 07-31-2013, 11:45 AM
  5. Setting the Height and Width of an Image
    By NaNaBoo in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 04-02-2009, 01:36 PM
  6. [SOLVED] Set Column Width Based On Total Width Of Other Columns
    By rayneraingoaway in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 06-28-2006, 06:10 PM
  7. [SOLVED] Excel Column Width Units
    By Robby Powell in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 07-13-2005, 05:05 PM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1