+ Reply to Thread
Results 1 to 3 of 3

Problems with excel

  1. #1
    Israel Moreno
    Guest

    Problems with excel

    Hi everybody,

    My question is this. How i run a visual basic's function in one cell of excel?

    Excuseme for my grammar's problem but i spanish.


    Thanks.

  2. #2
    JulieD
    Guest

    Re: Problems with excel

    Hi

    if you want the code to run when the value in a cell is changed or meets a
    certain criteria you can do this through a worksheet_change event (right
    mouse click on the relevant sheet tab and choose view code) e.g.

    Private Sub Worksheet_Change(ByVal Target As Range)

    application.enableevents = false
    on error goto err_handler
    if target.address = "$A$1" and target.value = 1 then
    'your code here
    end if

    err_handler:
    application.enableevents = true
    End Sub
    ---
    this says ... if cell A1 has changed and the value in this cell is 1 run the
    code

    Hope this helps
    Cheers
    JulieD


    "Israel Moreno" <[email protected]> wrote in message
    news:[email protected]...
    > Hi everybody,
    >
    > My question is this. How i run a visual basic's function in one cell of
    > excel?
    >
    > Excuseme for my grammar's problem but i spanish.
    >
    >
    > Thanks.




  3. #3
    Markus Scheible
    Guest

    Problems with excel

    Hi Israel,


    if your VBA function is called e.g. "function1()", simply
    use

    =function1()

    as the cell formula and it should work.

    Best

    Markus



    >-----Original Message-----
    >Hi everybody,
    >
    >My question is this. How i run a visual basic's function

    in one cell of excel?
    >
    >Excuseme for my grammar's problem but i spanish.
    >
    >
    >Thanks.
    >.
    >


+ 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