Thanks for the tip. I will look into it when I really get to that stage
Hopefully you can help with this. Please see the code snipet below:
Code
-------------------
Dim SourceData As Range
Dim found As Object
Set SourceData = Range("Companies")
Set found = Nothing
'Try to find the value on the worksheet
Set found = SourceData.Find(txtCompanyName.Value)
'If item is not found in the list...
If found Is Nothing Then
'redefine Companies
SourceData.Resize(SourceData.Rows.Count = 1, 1).Name = "Companies"
'add the new item to the end of the list on the worksheet
SourceData.Offset(SourceData.Rows.Count, 0).Resize(1, 1).Value = txtCompanyName.Value
'Reset the list displayed in the ComboBox
txtCompanyName.RowSource = Range("Companies").Address(external:=True)
End I
-------------------
I am running into errors at the SourceData.Resize... point of thi
code. It says "Application-defined or Object-defined error".
Help!!! I got this code straight off of one of the sites Tom refered m
to, one of the microsoft sites no less. The only thing I changed was th
text for the named range. The one from online used ListRange, and I use
Companies. That shouldn't make a difference should it.
Thanks a heap in advance!
JakeyC Wrote:
Application.Statusbar will change the message in the bottom left of the
window. You could have a very crude one that starts at "0%
Completed..." then a quarter of the way through your code becomes "25%
Completed..." etc.
John Walkenbach has a nice graphical solution at
http://www.j-walk.com/ss/excel/tips/tip34.htm which might be of use
--
Amber_D_Law
-----------------------------------------------------------------------
Amber_D_Laws's Profile:
http://www.excelforum.com/member.php...fo&userid=3001
View this thread:
http://www.excelforum.com/showthread.php?threadid=50587