Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi there I have attached at the bottom a piece of code from a
questionnaire I have made (with lots of help) and it calls a macro called addNewSheet at the end - for some reason this only works if they select yes for the final bit and if they select no nothing happens. Would anyone know where I am going wrong? detri = MsgBox("Question 4e. Could this information have had a detrimental effect on KM if it fell into the wrong hands?", vbYesNo) If detri = vbYes Then Range("D18") = "Question 4e. Could this information have had a detrimental effect on KM if it fell into the wrong hands?" Range("E18") = "Yes" Range("E18").Font.ColorIndex = 5 WhyDetri = InputBox("Question 4f. Why?") Range("D19") = "Question 4f. Why?" Range("E19") = WhyDetri Range("E19").Font.ColorIndex = 5 Columns("E").AutoFit Range("D13:E19").BorderAround ColorIndex:=xlAutomatic, Weight:=xlMedium Range("D13:E19").Borders(xlInsideHorizontal).LineS tyle = xlContinuous Range("D13:E19").Borders(xlInsideVertical).LineSty le = xlContinuous Else Range("D18") = "Question 4e. Could this information have had a detrimental effect on KM if it fell into the wrong hands?" Range("E18") = "No" Range("E18").Font.ColorIndex = 5 Columns("E").AutoFit Range("D13:E18").BorderAround ColorIndex:=xlAutomatic, Weight:=xlMedium Range("D13:E18").Borders(xlInsideHorizontal).LineS tyle = xlContinuous Range("D13:E18").Borders(xlInsideVertical).LineSty le = xlContinuous End If Call addNewSheet End Sub |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Protect selected settings in 'options' | Excel Worksheet Functions | |||
how do I display list options as different colour when selected? | Excel Worksheet Functions | |||
Working with options from within Tools Options clears the Clipboar | Excel Programming | |||
Calling in data from a selected cell | Excel Programming | |||
Calling another workbook not working | Excel Worksheet Functions |