Microsoft® Excel® based database addin

 

+ Reply to Thread
Results 1 to 2 of 2
  1. #1
    Karol_tom Guest

    Default [public variables - problem]

    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=n ow()

    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 ?


  2. #2
    Dave Peterson Guest

    Default Re: [public variables - problem]

    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.

    On 07/27/2010 14:09, Karol_tom wrote:
    > 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=n ow()
    >
    > 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 ?


    --
    Dave Peterson

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts