+ Reply to Thread
Results 1 to 3 of 3

Need a way to ensure background is scaled the same between computer to computer

  1. #1
    Registered User
    Join Date
    05-09-2016
    Location
    Cambridge, Ontario
    MS-Off Ver
    2007
    Posts
    2

    Need a way to ensure background is scaled the same between computer to computer

    I have a map of a large building that was created using Excel (using shapes/lines etc.). I want to use this map such that the user can click this map and it return the building column number closest to the cell that the user clicked on. My VBA code behind it works fine, I use the Excel row and column where clicked to parse which building column is to be returned by the function - no problems here.

    In order to make this work I'm using the Worksheet_SelectionChange() functionality to detect when the user selects somewhere on the map. This didn't work properly when all of the shapes/lines that constitute the map were in front of the cells that I wanted to click on. My solution to this was to export the map as a bitmap and use it as a background image. I made sure it was scaled exactly the same and was then able to click on any cell I want to without shapes interfering.

    I placed transparent red rectangles on the areas of the map that the user should not click. By locking the worksheet, the user cannot select the rectangle objects and can only click on where I've defined clickable.

    Now here's the tricky part: Everything is happy when I use it on my own computer. As long as I leave the worksheet scaling at 100%, the bitmap is perfectly lined up with my rectangles that are preventing the user from clicking where they shouldn't be. I sent it to a colleague, and the background was not scaled the same, even if he set it to 100%. Why is the scaling of my image changing? What can I do about it, from what I understand it's not possible to scale the background. Is there any way I can click "through" the shapes if I don't use the bitmap method?

    I've checked other threads but most of the answers were simply "no". I am willing to do the vba coding required if there is some roundabout way to do this. I just don't have any ideas.

    thanks.

  2. #2
    Forum Expert dflak's Avatar
    Join Date
    11-24-2015
    Location
    North Carolina
    MS-Off Ver
    365
    Posts
    7,957

    Re: Need a way to ensure background is scaled the same between computer to computer

    I don't know how complicated your map is, but have you thought about assigning a macro to the individual building shapes?
    One spreadsheet to rule them all. One spreadsheet to find them. One spreadsheet to bring them all and at corporate, bind them.

    A picture is worth a thousand words, but a sample spreadsheet is more likely to be worked on.

  3. #3
    Registered User
    Join Date
    05-09-2016
    Location
    Cambridge, Ontario
    MS-Off Ver
    2007
    Posts
    2

    Re: Need a way to ensure background is scaled the same between computer to computer

    Thanks for bouncing the idea but that's not really an option. It's a map of a production floor, so some shapes are largish and would probably correspond to 10 or more building columns underneath it, which is why I need "behind" them.

    Any other ideas?

    Thanks again.

    Edit: There are actually some other things I've tried:
    • Uses mouse position at the time of click. Correspond the mouse position to the cell underneath and merge it with my exisiting code. I could only get this to give me pointer feedback from my system, not with respect to where I am on the sheet. so this is not consistant between resolutions/which monitor/size of window
    • Split the image up into tiles that are the same size as the cells behind them, and put them on top instead of as a background. Clicking on them would activate the cell behind them to tie into my existing code. I don't fully know how to do this, and it looks like it will make my file size ridiculous.

    One more edit: The building has 33 x 36 structural columns, so anything that is FULLY manually implemented is not really going to work.
    Last edited by riley.lamers; 04-24-2017 at 04:30 PM. Reason: Additonal info

+ 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. Userform background images changes size on a different computer???
    By JJFletcher in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 10-27-2014, 10:25 PM
  2. VLookup works in my computer, but not in another user computer.
    By shiva_reshs in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 10-09-2013, 04:41 PM
  3. Replies: 6
    Last Post: 06-28-2013, 08:44 PM
  4. Replies: 1
    Last Post: 06-30-2012, 02:03 PM
  5. Replies: 0
    Last Post: 02-08-2010, 03:17 PM
  6. Auto Filter on my home computer differs from my work computer.
    By Sbova0226 in forum Excel - New Users/Basics
    Replies: 3
    Last Post: 07-08-2009, 03:04 PM
  7. [SOLVED] How do I copy all Excel files from old computer to new computer?
    By Rfarsh in forum Excel General
    Replies: 2
    Last Post: 12-19-2005, 11:23 PM

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