Results 1 to 3 of 3

Thread: Excel's R1C1 Formula

Threaded View

  1. #1

    Thread Starter
    Hyperactive Member
    Join Date
    Mar 2001
    Posts
    485

    Thumbs down Excel's R1C1 Formula [UNRESOLVED]

    Hi,

    I have this dummy cell, which I assign a custom sub to it using this way, for eg:

    Code:
    Range("A3").FormulaR1C1Local = "=Count(R[-2]C)"
    Based on the formula, I passed in Cell "A1" into sub Count as parameter. Hence, when I key in anything in Cell "A1", it will execute Count sub.

    The problem is, in my Count sub, I have something like this
    Code:
    Public Sub Count(iInvalue as Integer)
    	Range("A2").Value = iInvalue * 3
    End Sub
    Upon executing the line in Count sub, it will exit the Sub with an error
    Code:
    Run-time error '1004':
    
    Application-defined or object-defined error
    I was able to retrieve value from cell on the sheet though, such as
    sValue = Range("A4").Value
    or display a message box
    msgbox "Not working"

    I just can't alter value on the Cell. The worksheet is newly opened, which is NOT protected or anyhow.

    Does anyone has any idea what happened?

    Please advise.

    Thank you.
    Last edited by Harddisk; Oct 10th, 2005 at 08:41 PM. Reason: No solution. It's not possible on EXCEL

Posting Permissions

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



Click Here to Expand Forum to Full Width