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.
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.
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.
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.
>.
>
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks