View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
jamescox[_105_] jamescox[_105_] is offline
external usenet poster
 
Posts: 1
Default How public is public?


Ken -

You've got a problem in the IF statement: the test you are using

VarType(CH_Row) = vbNull

is checking the _type_ of variable CH_Row has been declared to be, not
the value it has. An integer (or any numeric variable) to which a value
has not yet been assigned has a value of zero.

So, if you meant to check if a value for CH_Row has been set in Sub
ColsHideKen, a more appropriate test would be


If CH_Row = 0 Then

Note that, as you assumed, once CH_Row has been set to zero the user
will never again be presented with the input box - unless you set CH_Row
back to zero once you do whatever ColsHide is supposed to do (or hide).

Hope this helps! :Bgr


--
jamescox
------------------------------------------------------------------------
jamescox's Profile: http://www.thecodecage.com/forumz/member.php?userid=449
View this thread: http://www.thecodecage.com/forumz/sh...d.php?t=121274