LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
JGH JGH is offline
external usenet poster
 
Posts: 2
Default combobox out of memory error

I have a combobox in a form which throws up a message when the combobox
change event is fired the message reads "Not enough system resources to
display completley". Even with on error statement the messages still appears,
is this a problem with forms that have many feilds or objects?

can one flush the memory within vba or release resources?

See attached segment of code,

Public Sub CHANGECATDETAILS_Click()
Msg = ""
If CHANGECATDETAILS.Caption = "LIST VDR CATEGORIES ONLY" Then
Title = "VDR Categories Only Selected"
Msg = "Note Drop Down Box will only display Categories listed in VDR" &
vbCrLf & vbCrLf
Msg = Msg & "To display All categories Click on Cancel button" & vbCrLf
& vbCrLf
Else
Title = "ALL Categories Selected"
Msg = "Note Drop Down Box will display ALL Categories available in
database" & vbCrLf & vbCrLf
Msg = Msg & "To display only VDR categories Click on Cancel button" &
vbCrLf & vbCrLf

End If
Msg = Msg & "To continue click on OK button"
Style = vbOK + vbInformation

response = MsgBox(Msg, Style, Title)

If response = vbCancel Then Exit Sub

If CHANGECATDETAILS.Caption = "LIST VDR CATEGORIES ONLY" Then
vdr1 = True
Else
vdr1 = False
End If

refresh

If vdr1 = True Then
CHANGECATDETAILS.Caption = "LIST ALL CATEGORIES"

Else
CHANGECATDETAILS.Caption = "LIST VDR CATEGORIES ONLY"
End If
End Sub

Public Sub refresh()
UserForm2.ComboBox5.RowSource = ("")
UserForm2.ComboBox6.RowSource = ("")

If vdr1 = True Then


Dim buf
Dim arrayRet()
Dim i As Long, j As Long
Dim rownum1, ms As Variant
buf = Application.Transpose([doccat3].Value)

For i = LBound(buf, 2) To UBound(buf, 2)

If buf(1, i) < "" And buf(1, i) < "ZZZ" Then
j = j + 1
ReDim Preserve arrayRet(LBound(buf) To UBound(buf), 1 To j)
arrayRet(1, j) = buf(1, i) 'Column A
arrayRet(2, j) = buf(2, i) 'Column B
Set listcat = Range("catonly")
rownum1 = Application.Match(buf(1, i), listcat, 0) 'Column C
arrayRet(3, j) = rownum1

End If

Next

UserForm2.ComboBox5.Column = arrayRet
UserForm2.ComboBox6.Column = arrayRet

'CHANGECATDETAILS.Caption = "LIST ALL CATEGORIES"

UserForm2.ComboBox6.Text = "A01"


Else
'vdr1 = False
'CHANGECATDETAILS.Caption = "LIST VDR CATEGORIES ONLY"
UserForm2.ComboBox5.RowSource = ("STDTITLES1")
UserForm2.ComboBox6.RowSource = ("catonly")
End If
End Sub

**************end*************


 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
How to handle error 8007000e Memory Error L. A. M. Excel Programming 6 June 28th 05 04:05 AM
Out of memory error Francesco Guiseppe Linguine Excel Programming 4 August 3rd 04 01:49 PM
Out of Memory Error Edgar Thoemmes Excel Programming 1 January 25th 04 01:52 PM
Out of memory error JJ[_6_] Excel Programming 1 January 23rd 04 03:29 PM
out of memory error rosanne Excel Programming 2 July 16th 03 06:21 AM


All times are GMT +1. The time now is 08:36 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"