Combo box with a Yes or No drop but how do you make the Y a default always entered

Kurt

Well-known Member
Joined
Jul 23, 2002
Messages
1,664
Hello Alll,

How do you make a Yes No combo box always have the default answer as Yes appearing on a user form but still allow the user to change it to NO?

Thanks in advance for all ideas and suggestions.

Kurt
 
I want the sheet to be able to move as my code produces the report and clears the worksheet area.

Is there some kind of syntax in the code that will allow the sheet to shift but keep the cell on D5?
 
Upvote 0

Excel Facts

Excel Wisdom
Using a mouse in Excel is the work equivalent of wearing a lanyard when you first get to college
Hello Andrew and all,

Here is my print code:

Code:
'
' Print_Lucky_13 Macro
' Macro recorded 12/15/2009 by Kurt
'

'
    Sheets("PowerAnalysis").Select
    Range("B1:I1").Select
    Selection.Copy
    Sheets("Report").Select
    Range("D5:K5").Select
    Selection.PasteSpecial Paste:=xlPasteValuesAndNumberFormats, Operation:= _
        xlNone, SkipBlanks:=False, Transpose:=False
    Selection.Font.Bold = True
    Columns("K:K").EntireColumn.AutoFit
    Sheets("PowerAnalysis").Select
    Range("B2:I2").Select
    Selection.Copy
    Sheets("Report").Select
    Range("D6:K6").Select
    Selection.PasteSpecial Paste:=xlPasteValuesAndNumberFormats, Operation:= _
        xlNone, SkipBlanks:=False, Transpose:=False
    Sheets("PowerAnalysis").Select
    Range("J1:O1").Select
    Application.CutCopyMode = False
    Selection.Copy
    Sheets("Report").Select
    Range("D8").Select
    Selection.PasteSpecial Paste:=xlPasteValuesAndNumberFormats, Operation:= _
        xlNone, SkipBlanks:=False, Transpose:=False
    Range("D8").Select
    Selection.Font.Bold = True
    Sheets("PowerAnalysis").Select
    Range("J2:O2").Select
    Selection.Copy
    Sheets("Report").Select
    Range("D9").Select
    Selection.PasteSpecial Paste:=xlPasteValuesAndNumberFormats, Operation:= _
        xlNone, SkipBlanks:=False, Transpose:=False
    Range("D9").Select
    Selection.Font.Bold = True
    Sheets("PowerAnalysis").Select
    Range("P1:R1").Select
    Selection.Copy
    Sheets("Report").Select
    Range("I8").Select
    Selection.PasteSpecial Paste:=xlPasteValuesAndNumberFormats, Operation:= _
        xlNone, SkipBlanks:=False, Transpose:=False
    Selection.Font.Bold = True
    Range("C40").Select
    Sheets("PowerAnalysis").Select
    Range("P2:R3").Select
    Selection.Copy
    Sheets("Report").Select
    Range("I9").Select
    Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
        :=False, Transpose:=False
    Sheets("PowerAnalysis").Select
    Range("K22:N22").Select
    Application.CutCopyMode = False
    Selection.Copy
    Sheets("Report").Select
    Range("D11").Select
    Selection.PasteSpecial Paste:=xlPasteValuesAndNumberFormats, Operation:= _
        xlNone, SkipBlanks:=False, Transpose:=False
    Selection.Font.Bold = True
    Sheets("PowerAnalysis").Select
    Range("K23:N23").Select
    Selection.Copy
    Sheets("Report").Select
    Range("D13").Select
    Selection.PasteSpecial Paste:=xlPasteValuesAndNumberFormats, Operation:= _
        xlNone, SkipBlanks:=False, Transpose:=False
    Selection.Font.Bold = True
    Sheets("PowerAnalysis").Select
    Range("K24:N25").Select
    Selection.Copy
    Sheets("Report").Select
    Range("D15").Select
    Selection.PasteSpecial Paste:=xlPasteValuesAndNumberFormats, Operation:= _
        xlNone, SkipBlanks:=False, Transpose:=False
    Sheets("PowerAnalysis").Select
    ActiveWindow.SmallScroll Down:=75
    Range("J94").Select
    Application.CutCopyMode = False
    Selection.Copy
    Sheets("Report").Select
    Range("D17").Select
    Selection.PasteSpecial Paste:=xlPasteValuesAndNumberFormats, Operation:= _
        xlNone, SkipBlanks:=False, Transpose:=False
    Selection.Font.Bold = True
    Sheets("PowerAnalysis").Select
    ActiveWindow.SmallScroll Down:=-63
    Range("K26:N28").Select
    Selection.Copy
    Sheets("Report").Select
    Range("D19").Select
    Selection.PasteSpecial Paste:=xlPasteValuesAndNumberFormats, Operation:= _
        xlNone, SkipBlanks:=False, Transpose:=False
    Sheets("PowerAnalysis").Select
    Range("K29:N29").Select
    Application.CutCopyMode = False
    Selection.Copy
    Sheets("Report").Select
    Range("D21").Select
    Selection.PasteSpecial Paste:=xlPasteValuesAndNumberFormats, Operation:= _
        xlNone, SkipBlanks:=False, Transpose:=False
    Selection.Font.Bold = True
    Sheets("PowerAnalysis").Select
    Range("K30:N31").Select
    Selection.Copy
    Sheets("Report").Select
    Range("D23").Select
    Selection.PasteSpecial Paste:=xlPasteValuesAndNumberFormats, Operation:= _
        xlNone, SkipBlanks:=False, Transpose:=False
    Sheets("PowerAnalysis").Select
    Range("K32:N32").Select
    Application.CutCopyMode = False
    Selection.Copy
    Sheets("Report").Select
    Range("D25").Select
    Selection.PasteSpecial Paste:=xlPasteValuesAndNumberFormats, Operation:= _
        xlNone, SkipBlanks:=False, Transpose:=False
    Selection.Font.Bold = True
    Sheets("PowerAnalysis").Select
    Range("K33:N34").Select
    Selection.Copy
    Sheets("Report").Select
    Range("D26").Select
    Selection.PasteSpecial Paste:=xlPasteValuesAndNumberFormats, Operation:= _
        xlNone, SkipBlanks:=False, Transpose:=False
    Application.CutCopyMode = False
    Selection.Cut
    Range("D27").Select
    ActiveSheet.Paste
    Sheets("PowerAnalysis").Select
    Range("K35:N35").Select
    Selection.Copy
    Sheets("Report").Select
    Range("D29").Select
    Selection.PasteSpecial Paste:=xlPasteValuesAndNumberFormats, Operation:= _
        xlNone, SkipBlanks:=False, Transpose:=False
    Range("D29").Select
    Selection.Font.Bold = True
    Range("F29").Select
    Selection.Font.Bold = True
    Sheets("PowerAnalysis").Select
    Range("K36:N36").Select
    Selection.Copy
    Sheets("Report").Select
    Range("D31").Select
    Selection.PasteSpecial Paste:=xlPasteValuesAndNumberFormats, Operation:= _
        xlNone, SkipBlanks:=False, Transpose:=False
    Range("D31:F31").Select
    Selection.Font.Bold = True
    Sheets("PowerAnalysis").Select
    Range("K37:M37").Select
    Selection.Copy
    Sheets("Report").Select
    Range("D33").Select
    Selection.PasteSpecial Paste:=xlPasteValuesAndNumberFormats, Operation:= _
        xlNone, SkipBlanks:=False, Transpose:=False
    Selection.Font.Bold = True
    Sheets("PowerAnalysis").Select
    Range("N37").Select
    Selection.Copy
    Sheets("Report").Select
    Range("G33").Select
    Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
        :=False, Transpose:=False
    Sheets("PowerAnalysis").Select
    Range("K39:N39").Select
    Application.CutCopyMode = False
    Selection.Copy
    Sheets("Report").Select
    Range("D35").Select
    Selection.PasteSpecial Paste:=xlPasteValuesAndNumberFormats, Operation:= _
        xlNone, SkipBlanks:=False, Transpose:=False
    Sheets("PowerAnalysis(3)").Select
    Range("D22:E22").Select
    Application.CutCopyMode = False
    Selection.Copy
    Sheets("Report").Select
    Range("I21").Select
    Selection.PasteSpecial Paste:=xlPasteValuesAndNumberFormats, Operation:= _
        xlNone, SkipBlanks:=False, Transpose:=False
    Selection.Font.Bold = True
    Sheets("PowerAnalysis").Select
    Range("F22").Select
    Selection.Copy
    Sheets("Report").Select
    Range("K21").Select
    Selection.PasteSpecial Paste:=xlPasteValuesAndNumberFormats, Operation:= _
        xlNone, SkipBlanks:=False, Transpose:=False
    Sheets("PowerAnalysis").Select
    Range("G22:J27").Select
    Application.CutCopyMode = False
    Selection.Copy
    Sheets("Report").Select
    Range("I24").Select
    Selection.PasteSpecial Paste:=xlPasteValuesAndNumberFormats, Operation:= _
        xlNone, SkipBlanks:=False, Transpose:=False
    Application.CutCopyMode = False
    With Selection
        .HorizontalAlignment = xlGeneral
        .VerticalAlignment = xlBottom
        .WrapText = True
        .Orientation = 0
        .AddIndent = False
        .IndentLevel = 0
        .ShrinkToFit = False
        .ReadingOrder = xlContext
        .MergeCells = True
    End With
    Range("D5").Select
    Application.CutCopyMode = False
    Application.Goto Worksheets("Report").Range("D5"), True

When I place the code at the bottom, it does not show the report.

What else should I add?

Kurt
 
Upvote 0
What do you mean "it doesn't show the report"? If you don't want D5 at top left remove the scroll argument:

Application.Goto Worksheets("Report").Range("D5")
 
Upvote 0
I tried that but it will not display the entire report.

Do I need to let the report run first and then have that code called after the report is completely run?
 
Upvote 0
What do you want the top left cell to be?

You have already select D5 on the Report sheet so you don't need Application.GoTo at all.
 
Upvote 0

Forum statistics

Threads
1,214,924
Messages
6,122,294
Members
449,077
Latest member
Rkmenon

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top