Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Error Help ClearContents
Hi I am geting a error but not too sure why this line of code ,
Software_form.txtSoftware1.Value = ClearContents compile error variable not defined I understand the error but I thought clearContents was build in variable the code is in form any help many thanks :P |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Error Help ClearContents
If it's a list box then you can do the following
lstBoxTest.Clear but when you use the = sign you are trying to assign something to the object, so even if the textBox (I'm guessing that's what it is) did have a clear function it would be used by calling a method within the object like so Software_form.txtSoftware1.Clear but that won't work. Just do Software_form.txtSoftware1.Value = "" "millwalll" wrote: Hi I am geting a error but not too sure why this line of code , Software_form.txtSoftware1.Value = ClearContents compile error variable not defined I understand the error but I thought clearContents was build in variable the code is in form any help many thanks :P |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Error Help ClearContents
When I check the VBA help (Excel 2003), I only see a ClearContents method,
not a "built-in variable". The ClearContents method only applies to ranges and charts. I suggest you set the value of your textbox to vbNullString to clear it: Software_form.txtSoftware1.Value = vbNullString Hope this helps, Hutch "millwalll" wrote: Hi I am geting a error but not too sure why this line of code , Software_form.txtSoftware1.Value = ClearContents compile error variable not defined I understand the error but I thought clearContents was build in variable the code is in form any help many thanks :P |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
VBS Script and ClearContents -- Code Throws An Error | Excel Programming | |||
Clearcontents | Excel Programming | |||
ClearContents in event proc raises error | Excel Programming | |||
Clearcontents | Excel Programming | |||
Error of ClearContents | Excel Programming |