Translation

dgrosen

Board Regular
Joined
May 3, 2003
Messages
110
How do I translate this code into access?
The code will display X number of text boxes on the X axis and Y number of textboxes on the Y axis.

Dim i%, x%, l%, j%, y%
l = 40
x = Range("A1").Value
y = Range("A2").Value
For j = 1 To y
m = m + 20
l = 40
For i = 1 To x
l = l + 60
ActiveSheet.OLEObjects.Add(ClassType:="Forms.TextBox.1", Link:=False, DisplayAsIcon:=False, Left:=l, Top:=m, Width:=50, Height:=15).Select
Next i
Next j
 

Excel Facts

Test for Multiple Conditions in IF?
Use AND(test, test, test, test) or OR(test, test, test, ...) as the logical_test argument of IF.
You don't.

I could give you code that creates X number of textboxes on Y number of rows on a form but I still don't understand why you want to do that.
 
Upvote 0
Hi Norie: Thanks for you reply.
I am a stone and sea shell collector.
I have created a database using access where I input the name of the box, the ID of the sample and its location in the box (A1, B2..). I would like to have it in a more visual display.
I am trying to have this database for my own personal use to keep track of them.
I put the samples in boxes. The boxes have a grid and each spot contains one stone or sea shell with a unique ID#. Each boxes are named different and have different number of spaces.
Hope this helps
Thanks a lot
Dan
 
Upvote 0

Forum statistics

Threads
1,223,275
Messages
6,171,119
Members
452,381
Latest member
Nova88

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