Ruffy,
I have been studying you code which does not quite match your description.
The DrawCircleOnActiveCell routine draws a large formatted circle with its top at the same point of the top of cell B2 and the circle's left at the same point as the left of cell B2. This leaves cell B2 outside the left upper arc of the circle.
Now I have manipulated you code two different ways:
1. Draw the circle within cell B2
2. Draw the circle so that it perfectly surrounds B2
Are either of these you goal and if not, please explain the relationship between the circle and B2. Or are you just using B2 as a marker to position the circle on that part of the screen and there is no relationship.
The WidthHeightInCentimeters routine is quite perplexing as what you are attempting to do. Here is what I see that your code does:
1. Prompting for a cell width in micrometers
2. converting micrometers to points
3. 20 trial and errors to shrink cell widths to match the prompted width (now in points) which winds up in an endless loop
To correct this, Dim your variables as double instead of integers
4. You had indicated there are various sized cells but your code selects all the cells then performs resizing on all of them ("Cells.Select") so they all end up the same size. Please comment
You indicate you are attempting to label "perfect boxes" but you prompt for both a height (cm) and width (micrometers). Height and width should be the same therefore only one prompt seems reasonable. It is also unclear that when you achieve the box size you want how that relates to the circle. Are you attempting to label all the boxes that fall inside the circle?
Your code can be simplified greatly. Can you please provide an image of what your sheet should look like after you run your code?
Maud
Can you post
Bookmarks