+ Reply to Thread
Results 1 to 11 of 11

#Name? Error in User Defined VB Function

  1. #1
    George Nicholson
    Guest

    Re: #Name? Error in User Defined VB Function

    > BucketWeight = weights(bucket)

    Just a guess but since I don't recognize the weights() function, I'm
    guessing Excel might not either? That would explain a #Name error.

    Any chance there is a User defined function (or more than one) in a
    Personal.xls file that existed on yesterday's machine but not on today's?

    HTH,
    --
    George Nicholson

    Remove 'Junk' from return address.


    "idgity" <[email protected]> wrote in message
    news:[email protected]...
    > Hi,
    >
    > I'm new to making VB functions for Excel, but I managed to make one
    > yesterday that was producing the results I wanted. Now today, after
    > copying
    > the excel file to a different computer, the function gives me the #Name?
    > error, even though I haven't changed it or it's arguments. Alt+F11 shows
    > the
    > function, but the spreadsheet doesn't seem to recognize it. What do I
    > do?
    > Here is the (very simple) function:
    >
    > Function BucketWeight(bucket, weights)
    > BucketWeight = weights(bucket)
    > End Function
    >
    > bucket is a number and weights should be an array. I'm calling it like:
    > =BucketWeight($D3, $B$485:$B$489)
    >
    > Thanks a lot!




  2. #2
    idgity
    Guest

    Re: #Name? Error in User Defined VB Function

    Ah, that might be it, I was defining a whole bunch of functions yesterday and
    one of them might have been called "weights". Funny that it was giving the
    right answers though. But I mean for weights to be an array of values passed
    in to the function, not another function. I'm passing in a chunk of an
    excel column. How do you tell VB it's an array? I've tried:
    Function BucketWeight(bucket, weights())
    and
    Function BucketWeight(bucket, weights() As Integer)
    but I still get #Name?

    Sorry these are very basic (ha) questions, but I'm used to C++ and java.

    Thanks.

    "George Nicholson" wrote:

    > > BucketWeight = weights(bucket)

    >
    > Just a guess but since I don't recognize the weights() function, I'm
    > guessing Excel might not either? That would explain a #Name error.
    >
    > Any chance there is a User defined function (or more than one) in a
    > Personal.xls file that existed on yesterday's machine but not on today's?
    >
    > HTH,
    > --
    > George Nicholson
    >
    > Remove 'Junk' from return address.
    >
    >
    > "idgity" <[email protected]> wrote in message
    > news:[email protected]...
    > > Hi,
    > >
    > > I'm new to making VB functions for Excel, but I managed to make one
    > > yesterday that was producing the results I wanted. Now today, after
    > > copying
    > > the excel file to a different computer, the function gives me the #Name?
    > > error, even though I haven't changed it or it's arguments. Alt+F11 shows
    > > the
    > > function, but the spreadsheet doesn't seem to recognize it. What do I
    > > do?
    > > Here is the (very simple) function:
    > >
    > > Function BucketWeight(bucket, weights)
    > > BucketWeight = weights(bucket)
    > > End Function
    > >
    > > bucket is a number and weights should be an array. I'm calling it like:
    > > =BucketWeight($D3, $B$485:$B$489)
    > >
    > > Thanks a lot!

    >
    >
    >


  3. #3
    George Nicholson
    Guest

    Re: #Name? Error in User Defined VB Function

    > BucketWeight = weights(bucket)

    Just a guess but since I don't recognize the weights() function, I'm
    guessing Excel might not either? That would explain a #Name error.

    Any chance there is a User defined function (or more than one) in a
    Personal.xls file that existed on yesterday's machine but not on today's?

    HTH,
    --
    George Nicholson

    Remove 'Junk' from return address.


    "idgity" <[email protected]> wrote in message
    news:[email protected]...
    > Hi,
    >
    > I'm new to making VB functions for Excel, but I managed to make one
    > yesterday that was producing the results I wanted. Now today, after
    > copying
    > the excel file to a different computer, the function gives me the #Name?
    > error, even though I haven't changed it or it's arguments. Alt+F11 shows
    > the
    > function, but the spreadsheet doesn't seem to recognize it. What do I
    > do?
    > Here is the (very simple) function:
    >
    > Function BucketWeight(bucket, weights)
    > BucketWeight = weights(bucket)
    > End Function
    >
    > bucket is a number and weights should be an array. I'm calling it like:
    > =BucketWeight($D3, $B$485:$B$489)
    >
    > Thanks a lot!




  4. #4
    idgity
    Guest

    Re: #Name? Error in User Defined VB Function

    Ah, that might be it, I was defining a whole bunch of functions yesterday and
    one of them might have been called "weights". Funny that it was giving the
    right answers though. But I mean for weights to be an array of values passed
    in to the function, not another function. I'm passing in a chunk of an
    excel column. How do you tell VB it's an array? I've tried:
    Function BucketWeight(bucket, weights())
    and
    Function BucketWeight(bucket, weights() As Integer)
    but I still get #Name?

    Sorry these are very basic (ha) questions, but I'm used to C++ and java.

    Thanks.

    "George Nicholson" wrote:

    > > BucketWeight = weights(bucket)

    >
    > Just a guess but since I don't recognize the weights() function, I'm
    > guessing Excel might not either? That would explain a #Name error.
    >
    > Any chance there is a User defined function (or more than one) in a
    > Personal.xls file that existed on yesterday's machine but not on today's?
    >
    > HTH,
    > --
    > George Nicholson
    >
    > Remove 'Junk' from return address.
    >
    >
    > "idgity" <[email protected]> wrote in message
    > news:[email protected]...
    > > Hi,
    > >
    > > I'm new to making VB functions for Excel, but I managed to make one
    > > yesterday that was producing the results I wanted. Now today, after
    > > copying
    > > the excel file to a different computer, the function gives me the #Name?
    > > error, even though I haven't changed it or it's arguments. Alt+F11 shows
    > > the
    > > function, but the spreadsheet doesn't seem to recognize it. What do I
    > > do?
    > > Here is the (very simple) function:
    > >
    > > Function BucketWeight(bucket, weights)
    > > BucketWeight = weights(bucket)
    > > End Function
    > >
    > > bucket is a number and weights should be an array. I'm calling it like:
    > > =BucketWeight($D3, $B$485:$B$489)
    > >
    > > Thanks a lot!

    >
    >
    >


  5. #5
    George Nicholson
    Guest

    Re: #Name? Error in User Defined VB Function

    > BucketWeight = weights(bucket)

    Just a guess but since I don't recognize the weights() function, I'm
    guessing Excel might not either? That would explain a #Name error.

    Any chance there is a User defined function (or more than one) in a
    Personal.xls file that existed on yesterday's machine but not on today's?

    HTH,
    --
    George Nicholson

    Remove 'Junk' from return address.


    "idgity" <[email protected]> wrote in message
    news:[email protected]...
    > Hi,
    >
    > I'm new to making VB functions for Excel, but I managed to make one
    > yesterday that was producing the results I wanted. Now today, after
    > copying
    > the excel file to a different computer, the function gives me the #Name?
    > error, even though I haven't changed it or it's arguments. Alt+F11 shows
    > the
    > function, but the spreadsheet doesn't seem to recognize it. What do I
    > do?
    > Here is the (very simple) function:
    >
    > Function BucketWeight(bucket, weights)
    > BucketWeight = weights(bucket)
    > End Function
    >
    > bucket is a number and weights should be an array. I'm calling it like:
    > =BucketWeight($D3, $B$485:$B$489)
    >
    > Thanks a lot!




  6. #6
    idgity
    Guest

    Re: #Name? Error in User Defined VB Function

    Ah, that might be it, I was defining a whole bunch of functions yesterday and
    one of them might have been called "weights". Funny that it was giving the
    right answers though. But I mean for weights to be an array of values passed
    in to the function, not another function. I'm passing in a chunk of an
    excel column. How do you tell VB it's an array? I've tried:
    Function BucketWeight(bucket, weights())
    and
    Function BucketWeight(bucket, weights() As Integer)
    but I still get #Name?

    Sorry these are very basic (ha) questions, but I'm used to C++ and java.

    Thanks.

    "George Nicholson" wrote:

    > > BucketWeight = weights(bucket)

    >
    > Just a guess but since I don't recognize the weights() function, I'm
    > guessing Excel might not either? That would explain a #Name error.
    >
    > Any chance there is a User defined function (or more than one) in a
    > Personal.xls file that existed on yesterday's machine but not on today's?
    >
    > HTH,
    > --
    > George Nicholson
    >
    > Remove 'Junk' from return address.
    >
    >
    > "idgity" <[email protected]> wrote in message
    > news:[email protected]...
    > > Hi,
    > >
    > > I'm new to making VB functions for Excel, but I managed to make one
    > > yesterday that was producing the results I wanted. Now today, after
    > > copying
    > > the excel file to a different computer, the function gives me the #Name?
    > > error, even though I haven't changed it or it's arguments. Alt+F11 shows
    > > the
    > > function, but the spreadsheet doesn't seem to recognize it. What do I
    > > do?
    > > Here is the (very simple) function:
    > >
    > > Function BucketWeight(bucket, weights)
    > > BucketWeight = weights(bucket)
    > > End Function
    > >
    > > bucket is a number and weights should be an array. I'm calling it like:
    > > =BucketWeight($D3, $B$485:$B$489)
    > >
    > > Thanks a lot!

    >
    >
    >


  7. #7
    George Nicholson
    Guest

    Re: #Name? Error in User Defined VB Function

    > BucketWeight = weights(bucket)

    Just a guess but since I don't recognize the weights() function, I'm
    guessing Excel might not either? That would explain a #Name error.

    Any chance there is a User defined function (or more than one) in a
    Personal.xls file that existed on yesterday's machine but not on today's?

    HTH,
    --
    George Nicholson

    Remove 'Junk' from return address.


    "idgity" <[email protected]> wrote in message
    news:[email protected]...
    > Hi,
    >
    > I'm new to making VB functions for Excel, but I managed to make one
    > yesterday that was producing the results I wanted. Now today, after
    > copying
    > the excel file to a different computer, the function gives me the #Name?
    > error, even though I haven't changed it or it's arguments. Alt+F11 shows
    > the
    > function, but the spreadsheet doesn't seem to recognize it. What do I
    > do?
    > Here is the (very simple) function:
    >
    > Function BucketWeight(bucket, weights)
    > BucketWeight = weights(bucket)
    > End Function
    >
    > bucket is a number and weights should be an array. I'm calling it like:
    > =BucketWeight($D3, $B$485:$B$489)
    >
    > Thanks a lot!




  8. #8
    idgity
    Guest

    Re: #Name? Error in User Defined VB Function

    Ah, that might be it, I was defining a whole bunch of functions yesterday and
    one of them might have been called "weights". Funny that it was giving the
    right answers though. But I mean for weights to be an array of values passed
    in to the function, not another function. I'm passing in a chunk of an
    excel column. How do you tell VB it's an array? I've tried:
    Function BucketWeight(bucket, weights())
    and
    Function BucketWeight(bucket, weights() As Integer)
    but I still get #Name?

    Sorry these are very basic (ha) questions, but I'm used to C++ and java.

    Thanks.

    "George Nicholson" wrote:

    > > BucketWeight = weights(bucket)

    >
    > Just a guess but since I don't recognize the weights() function, I'm
    > guessing Excel might not either? That would explain a #Name error.
    >
    > Any chance there is a User defined function (or more than one) in a
    > Personal.xls file that existed on yesterday's machine but not on today's?
    >
    > HTH,
    > --
    > George Nicholson
    >
    > Remove 'Junk' from return address.
    >
    >
    > "idgity" <[email protected]> wrote in message
    > news:[email protected]...
    > > Hi,
    > >
    > > I'm new to making VB functions for Excel, but I managed to make one
    > > yesterday that was producing the results I wanted. Now today, after
    > > copying
    > > the excel file to a different computer, the function gives me the #Name?
    > > error, even though I haven't changed it or it's arguments. Alt+F11 shows
    > > the
    > > function, but the spreadsheet doesn't seem to recognize it. What do I
    > > do?
    > > Here is the (very simple) function:
    > >
    > > Function BucketWeight(bucket, weights)
    > > BucketWeight = weights(bucket)
    > > End Function
    > >
    > > bucket is a number and weights should be an array. I'm calling it like:
    > > =BucketWeight($D3, $B$485:$B$489)
    > >
    > > Thanks a lot!

    >
    >
    >


  9. #9
    idgity
    Guest

    #Name? Error in User Defined VB Function

    Hi,

    I'm new to making VB functions for Excel, but I managed to make one
    yesterday that was producing the results I wanted. Now today, after copying
    the excel file to a different computer, the function gives me the #Name?
    error, even though I haven't changed it or it's arguments. Alt+F11 shows the
    function, but the spreadsheet doesn't seem to recognize it. What do I do?
    Here is the (very simple) function:

    Function BucketWeight(bucket, weights)
    BucketWeight = weights(bucket)
    End Function

    bucket is a number and weights should be an array. I'm calling it like:
    =BucketWeight($D3, $B$485:$B$489)

    Thanks a lot!

  10. #10
    George Nicholson
    Guest

    Re: #Name? Error in User Defined VB Function

    > BucketWeight = weights(bucket)

    Just a guess but since I don't recognize the weights() function, I'm
    guessing Excel might not either? That would explain a #Name error.

    Any chance there is a User defined function (or more than one) in a
    Personal.xls file that existed on yesterday's machine but not on today's?

    HTH,
    --
    George Nicholson

    Remove 'Junk' from return address.


    "idgity" <[email protected]> wrote in message
    news:[email protected]...
    > Hi,
    >
    > I'm new to making VB functions for Excel, but I managed to make one
    > yesterday that was producing the results I wanted. Now today, after
    > copying
    > the excel file to a different computer, the function gives me the #Name?
    > error, even though I haven't changed it or it's arguments. Alt+F11 shows
    > the
    > function, but the spreadsheet doesn't seem to recognize it. What do I
    > do?
    > Here is the (very simple) function:
    >
    > Function BucketWeight(bucket, weights)
    > BucketWeight = weights(bucket)
    > End Function
    >
    > bucket is a number and weights should be an array. I'm calling it like:
    > =BucketWeight($D3, $B$485:$B$489)
    >
    > Thanks a lot!




  11. #11
    idgity
    Guest

    Re: #Name? Error in User Defined VB Function

    Ah, that might be it, I was defining a whole bunch of functions yesterday and
    one of them might have been called "weights". Funny that it was giving the
    right answers though. But I mean for weights to be an array of values passed
    in to the function, not another function. I'm passing in a chunk of an
    excel column. How do you tell VB it's an array? I've tried:
    Function BucketWeight(bucket, weights())
    and
    Function BucketWeight(bucket, weights() As Integer)
    but I still get #Name?

    Sorry these are very basic (ha) questions, but I'm used to C++ and java.

    Thanks.

    "George Nicholson" wrote:

    > > BucketWeight = weights(bucket)

    >
    > Just a guess but since I don't recognize the weights() function, I'm
    > guessing Excel might not either? That would explain a #Name error.
    >
    > Any chance there is a User defined function (or more than one) in a
    > Personal.xls file that existed on yesterday's machine but not on today's?
    >
    > HTH,
    > --
    > George Nicholson
    >
    > Remove 'Junk' from return address.
    >
    >
    > "idgity" <[email protected]> wrote in message
    > news:[email protected]...
    > > Hi,
    > >
    > > I'm new to making VB functions for Excel, but I managed to make one
    > > yesterday that was producing the results I wanted. Now today, after
    > > copying
    > > the excel file to a different computer, the function gives me the #Name?
    > > error, even though I haven't changed it or it's arguments. Alt+F11 shows
    > > the
    > > function, but the spreadsheet doesn't seem to recognize it. What do I
    > > do?
    > > Here is the (very simple) function:
    > >
    > > Function BucketWeight(bucket, weights)
    > > BucketWeight = weights(bucket)
    > > End Function
    > >
    > > bucket is a number and weights should be an array. I'm calling it like:
    > > =BucketWeight($D3, $B$485:$B$489)
    > >
    > > Thanks a lot!

    >
    >
    >


+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

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

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1