Drawing objects in VBA?

scooble

Registered User.
Local time
Today, 08:37
Joined
Oct 25, 2010
Messages
18
I have some data on a form which works very well.
Basicly, I would like to represnt that data by drawing a number of rectangles and altering their position and length with VBA.

The number of rectangles can change, so is it possible to maybe draw 'x' many rectangles then alter their shape, or, create one rectangle and then copy it 'x' many times.

I am pretty sure, one I have the correct number of rectangles on the page, then I can position and size them appropriately.
 
In order to add the number of rectangles you need you would either need to

1. place as many rectangles on the page as you might need and then use code to modify their size and location

or

2. If you want to do it entirely dynamically you would need to have the code first open the form in design view (you can do that while it is hidden though) and then add the number required and then save the form. The drawback to this is that you can't use this method if you are wanting to compile this to an MDE or ACCDE file because design changes are not able to be done in those.
 

Users who are viewing this thread

Back
Top Bottom