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

How to calculate loan payments in Excel?
Use the PMT function: =PMT(5%/12,60,-25000) is for a $25,000 loan, 5% annual interest, 60 month loan.
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,221,904
Messages
6,162,744
Members
451,785
Latest member
DanielCorn

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