Calling a module from textbox
not tested!
'=========================
sub Jock()
dim myRange as range
set myRange = worksheet("Sheet1").range("m1") 'change to suit
if myrange.value = "CH" then
me.textbox1.visible=true
me.optionyes.visible=true
me.optionno.visible=true
else
'do nothing
end if
end sub
'==============================
private sub optionyes_click()
call Charge
end sub
'=============================
private sub optionno_click()
dim myRange as range
set myRange = worksheet("Sheet1").range("m1") 'change to suit
myrange.value = ""
end sub
'===============================
right click your appropriate sheet tab & choose "View Code". Place
this code there. i used a textbox and option buttons from the ActiveX
Control Toolbox, not the Forms toolbar. if you want sub Jock to
happen automatically, you'd have to make it a worksheet_change sub.
hope it gets you started!
:)
susan
On Jan 6, 8:04*am, Jock wrote:
When "CH" is entered in a cell in column 'M', I'd like a text box to appear
with "Really?" and a yes no option.
If No is selected, to clear the cell in 'M' but to remain with focus.
If Yes is selected, to run code called Sub Charge( ) which is located in
Module 1.
Any ideas?
Thanks
--
Traa Dy Liooar
Jock
|