Macro within a macro

A

a m spock

,I need to write a simple macro which checks value in a cell then, depending
on value returned, starts macro a or macro b. how do i do it.
 
D

Dave Peterson

Dim myCell as range
set mycell = workbooks("somebook.xls").worksheets("sheet999").range("a1")
or something like
set mycell = activesheet.range("a1")

if mycell.value = 8 then
call othermacronamehere
else
call adifferentmacrohere
end if
 
A

a m spock

Many Thanks. Works like a charm!

Dave Peterson said:
Dim myCell as range
set mycell = workbooks("somebook.xls").worksheets("sheet999").range("a1")
or something like
set mycell = activesheet.range("a1")

if mycell.value = 8 then
call othermacronamehere
else
call adifferentmacrohere
end if
 
Top