Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hello to everybody,
I would like to delete only the values and not the various formatting with a button plus a message (Are you sure to delete the datas?) the following dynamic range: -from B9:H9 -from A23:G? up to the last row contains data. Can you please help? Thanks and Regards John |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
hi John,
Private Sub CommandButton1_Click() Dim LastRow As Long Dim Msg, Style, Title, Response Msg = "Are you sure to delete the select datas?" Style = vbYesNo + vbCritical + vbDefaultButton2 Title = "Clear Contents" LastRow = Cells(Rows.Count, 1).End(xlUp).Row Union(Range("B9:H9"), Range("A23:G" & LastRow)).Select Response = MsgBox(Msg, Style, Title) If Response = vbYes Then Selection.ClearContents End If End Sub isabelle Le 2013-01-08 14:22, John a écrit : Hello to everybody, I would like to delete only the values and not the various formatting with a button plus a message (Are you sure to delete the datas?) the following dynamic range: -from B9:H9 -from A23:G? up to the last row contains data. Can you please help? Thanks and Regards John |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Thank you Isabelle.
It is perfect! Regards John |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
thankfully it works despite my misspellings,
glad i could help isabelle Le 2013-01-08 16:06, John a écrit : Thank you Isabelle. It is perfect! Regards John |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Dynamic ranges | Charts and Charting in Excel | |||
Dynamic Ranges | Excel Discussion (Misc queries) | |||
dynamic ranges | Excel Worksheet Functions | |||
Dynamic Formulas with Dynamic Ranges | Excel Worksheet Functions | |||
Dynamic Ranges Q | Excel Programming |