View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.programming
erikcw[_7_] erikcw[_7_] is offline
external usenet poster
 
Posts: 1
Default Max size of variable?


Here is a test I ran in my application to see what would happen


Code
-------------------

Option Explicit
' 2004-11-11, Created

Private Sub CommandButton1_Click()


'MsgBox "This macro reads data from Excel sheet and submits to com."

Dim iim1, iret, row, totalrows, kw, mrls, primary As String, sKords, i, i2, domains(), temp, anchor, domainskw

Set iim1 = CreateObject("IM.iim")

iret = iim1.iimInit
iret = iim1.iimDisplay("Submitting Data from Excel")


iret = iim1.iimPlay("login")

totalrows = ActiveSheet.UsedRange.Rows.Count
For row = 2 To totalrows

If Cells(row, 24).Value < 1 And Cells(row, 18).Value = 1 Then

'test primary variable
primary = Empty
For i = 0 To 5000
primary = primary & "word phrase " & CStr(i) & vbNewLine
Next
MsgBox primary


-------------------


msgbox primary:

Code
-------------------

word phrase 0
word phrase 1
word phrase n...
word phrase 63
word phra

-------------------


So - primary is dimensioned as a variable leangth string, but produce
this result. I've also trie variant - same result.

Any ideas

--
erikc
-----------------------------------------------------------------------
erikcw's Profile: http://www.excelforum.com/member.php...fo&userid=2879
View this thread: http://www.excelforum.com/showthread.php?threadid=48919