[public variables - problem]

K

Karol_tom

Hi,

when i start (two weeks ago) develop my macro i declare

public const column_of_something = 3, column_of_something2=5

and so on... I use it when i want type some value into cell, for example

cells(activecell.row,column_of_something2).value=now()

everything works fine....but

but today...I add one

if
....
end if

and I always get error message - Excel tells me that he need constant value
and point into my
(public as I show) variables...
what's wrong ?
 
D

Dave Peterson

I don't have a guess, but my bet is that the declaration line has an error in it.

But since you didn't share the exact line, it's difficult to know for sure.

If you don't think that's the problem, then maybe you should share that line and
the snippet of code that causes the error -- and indicate what line in that
snippet is bad.
 
Top