ipbr21054

Well-known Member
Joined
Nov 16, 2010
Messages
5,271
Office Version
  1. 2007
Platform
  1. Windows
Hi,

The code in use is shown below.

Please can you explain why or what this part refers or does warning = MsgBox(Range("A6").Value

I press the button,i am asked the question,the range in question that will be changed to 0 is C1:F17 so im lost as to why A6 is even there.....


Code:
Sub zero()'
' zero Macro
'


'
    Dim warning
    warning = MsgBox(Range("A6").Value & "Are You Sure You Wish To Zero All The Cells ?", vbQuestion + vbYesNo, "Warning This Will Delete The Cell Info")
    If warning = vbNo Then Exit Sub
    
    
    Range("D1", "D17") = "0"
    Range("F1", "F17") = "0"
    Range("C1:F17").Select
        With Selection.Interior
        .Pattern = xlSolid
        .PatternColorIndex = xlAutomatic
        .ThemeColor = xlThemeColorAccent5
        .TintAndShade = 0.599993896298105
        .PatternTintAndShade = 0
        End With
    Range("A13").Select
End Sub
 
My apologies,
I now understand what you have said & confirm its all true.

Thanks
 
Upvote 0

Excel Facts

Can you sort left to right?
To sort left-to-right, use the Sort dialog box. Click Options. Choose "Sort left to right"

Forum statistics

Threads
1,215,988
Messages
6,128,142
Members
449,426
Latest member
revK

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