View Single Post
  #7   Report Post  
Posted to microsoft.public.excel.programming
Klein-4 Klein-4 is offline
external usenet poster
 
Posts: 2
Default Advice rather than an actual question.

You're welcome. :-)

Ross La Haye

PaulW wrote:
Cheers, I didn't know these things, so I can use them in the future to save
time and space..

The whole 9999 and 99999999 thing was so I could test to see if that
variable had been filled. I wasn't sure how else to do it since just checking
if X is Nothing didn't work, I figured filling it, then checking to see if it
had been changed was the best way to do it.

The whole checkboxes and setting them to 1 was cos originally it brought up
a message if more than 1 checkbox was ticked to say it couldn't do the
desired function. But I took that bit out when I figured out how to have the
thing work regardless of how many boxes are checked. Cos I was in a rush when
I did that bit I didn't read through the entire code to see if those
variables were used again, so thought it'd be best to keep that part in. I
then kinda forgot about it. Should go back and sort it out really.

Thanks again

Also, you can iterate through any collection of objects, as you have
done with cells. For instance, you can iterate through combo boxes, so
you could set up a loop to clear them one at a time rather than
hard-coding in the clearing.


You could dimension 2 arrays arrRow(1 To 4) and arrRes(2 To 5) and
populate them like this --

For i = 1 to 4
arrRow(i) = 9999
Next i

For i = 2 to 5
arrRes(i) = 999999999
Next i

Also, you could use a loop for the following code which would populate
an array arrCheck(1 To 4). I don't think you have to test for the
condition either, just simply populate and check later what the value
is when you need to...