programmable textbox placement

palaeontology

Active Member
Joined
May 12, 2017
Messages
444
Office Version
  1. 2016
Platform
  1. Windows
I've made a spreadsheet that produces a Cartesian Plane to the dimensions chosen by the user (ugggh, I had to resize the image to have it accepted here, but it has come ut a little blurry .. sorry) ...

16 (Small).JPG

The scale values are just textboxes positioned around the outside.

What I've been trying to figure out is, when a user chooses different dimensions for the grid, how can I program the textboxes to reposition according to the dimensions of the graph., as well as hide the textboxes not needed.

For example, if a user chose the following dimensions ....


17.JPG


Notice the disappearance of the scale values that were outside the dimensions chosen, as well as the scale values moving in to maintain a small distance away from the new perimeter of the grid.

Is it even possible to program the placement of textboxes, or should I go down a different path. I've tried several other things, but not one has been satisfactory

Kind regards,

Chris
 

Excel Facts

Formula for Yesterday
Name Manager, New Name. Yesterday =TODAY()-1. OK. Then, use =YESTERDAY in any cell. Tomorrow could be =TODAY()+1.
If it's not possible to write code to move textboxes around, is it possible to code to move either Form Control 'Labels' or Active X 'Labels' around to various positions ?

I seem to remember seeing this done many years ago with someone who made a cricket pitch with some kind of Label that was programmed to move to set positions on the cricket ground based on certain conditions ... but I can't find any reference to this anywhere.

I think this might be my best line of attack to solve this problem.

Can anyone give me a hint how to code to move a 'Label' to a certain position, given a condition, like an IF statement ?

If so, I should be able to run from there and piece together what I need for all the Labels.

Very kind regards,

Chris
 
Upvote 0
Chris

How many textboxes/labels do you have in the posted images and what size are they?
 
Upvote 0
Chris

How many textboxes/labels do you have in the posted images and what size are they?
Hi Norie,

I have 42 textboxes in total (21 on the y-axis and 21 on the x-axis).

Each is 0.91cm high and between 0.83 to 1.34cm wide (depending on the number).

The Cartesian Plane is currently in a worksheet (not a UserForm)

Very kind regards,

Chris
 
Upvote 0
Would you like me to send you the file to play with ?

I'm using Conditional Formatting to conceal specific parts of a complete Cartesian Plane depending on values found in cells V35, V42, V67, and V74.
 
Upvote 0

Forum statistics

Threads
1,214,914
Messages
6,122,211
Members
449,074
Latest member
cancansova

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top