Tracy, Thanks for the help - the first line makessence and executes just fine but the "oTextbox = evaluate" line errors with variable "TEXTBOX11" is not found. Do I need something in my code or on my form to have this work properly?
BTW - sorry for not doing this as a reply. My email no longer gets posts from replies to my emails so I need to get them from .the archive. I reported the problem to Mailman at the leafe.com but have not received a response.
Thanks again, Joe
--- StripMime Report -- processed MIME parts --- multipart/alternative text/plain (text body -- kept) text/html ---
Try this:
FOR i = 1 TO 4 FOR j = 1 TO 10 m.lcTextBoxName = "TextBox" + LTRIM(STR(i)) + LTRIM(STR(j)) THISFORM.ADDOBJECT( m.lcTextBoxName, "textbox")
oTextbox = EVALUATE( "Thisform." + m.lcTextBoxName) WITH oTextbox .NAME = "TextBox" + LTRIM(STR(i)) + LTRIM(STR(j)) .LEFT = (j - 1) * 10 .TOP = (i - 1) * 20 .WIDTH = 100 .HEIGHT = 20 .VALUE = "Data for cell " + LTRIM(STR(i)) + ", " + LTRIM(STR(j)) .VISIBLE = .T. ENDWITH ENDFOR ENDFOR
Frank.
Frank Cazabon
On 30/10/2023 2:23 pm, Joe Yoder wrote:
Tracy, Thanks for the help - the first line makessence and executes just fine but the "oTextbox = evaluate" line errors with variable "TEXTBOX11" is not found. Do I need something in my code or on my form to have this work properly?
BTW - sorry for not doing this as a reply. My email no longer gets posts from replies to my emails so I need to get them from .the archive. I reported the problem to Mailman at the leafe.com but have not received a response.
Thanks again, Joe
--- StripMime Report -- processed MIME parts --- multipart/alternative text/plain (text body -- kept) text/html
[excessive quoting removed by server]
This one even provides a working version :=)
*********************************** nStartRow = 10 nStartCol = 10
For nCol = 1 To 4 For nRow = 1 To 10 cTextBoxName = "TextBox" + Trans(nCol) + Trans(nRow) Thisform.AddObject( cTextBoxName, "textbox")
With Thisform.&cTextBoxName .Left = nStartCol + ((nCol-1) * 110) .Top = nStartRow + ((nRow-1) * 24) .Width = 100 .Value = "Cell " + Trans(nCol) + ", " + Transform(nRow) .Visible = .T. Endwith Endfor Endfor ***********************************