Hi, Try :
Sub test2() Dim c With Sheets("calculator") On Error Resume Next For i = 1 To .Shapes.Count Var = .Shapes(i).OLEFormat.progID If Err.Number <> 0 Then Err.Clear Else If .Shapes(i).OLEFormat.progID = "Forms.TextBox.1" _ Or .Shapes(i).OLEFormat.progID = "Forms.ComboBox.1" Then strname = .Shapes(i).Name .OLEObjects(strname).Object.Value = "" End If End If Next i End With End Sub Regards. Daniel De : excel-macros@googlegroups.com [mailto:excel-macros@googlegroups.com] De la part de santosh subudhi Envoyé : mardi 5 avril 2011 23:31 À : excel-macros@googlegroups.com Objet : $$Excel-Macros$$ code to clear all the values at a one go Hi Group, Need a code to clear the values of all the text boxes ,comboboxes in one click in a excel sheet with the name "calculator" -- Regards Santosh santoshkumar.subu...@gmail.com -- ---------------------------------------------------------------------------- ------ Some important links for excel users: 1. Follow us on TWITTER for tips tricks and links : http://twitter.com/exceldailytip 2. Join our LinkedIN group @ http://www.linkedin.com/groups?gid=1871310 3. Excel tutorials at http://www.excel-macros.blogspot.com 4. Learn VBA Macros at http://www.quickvba.blogspot.com 5. Excel Tips and Tricks at <http://exceldailytip.blogspot.com> http://exceldailytip.blogspot.com To post to this group, send email to <mailto:excel-macros@googlegroups.com> excel-macros@googlegroups.com <><><><><><><><><><><><><><><><><><><><><><> Like our page on facebook , Just follow below link <http://www.facebook.com/discussexcel> http://www.facebook.com/discussexcel -- ---------------------------------------------------------------------------------- Some important links for excel users: 1. Follow us on TWITTER for tips tricks and links : http://twitter.com/exceldailytip 2. Join our LinkedIN group @ http://www.linkedin.com/groups?gid=1871310 3. Excel tutorials at http://www.excel-macros.blogspot.com 4. Learn VBA Macros at http://www.quickvba.blogspot.com 5. Excel Tips and Tricks at http://exceldailytip.blogspot.com To post to this group, send email to excel-macros@googlegroups.com <><><><><><><><><><><><><><><><><><><><><><> Like our page on facebook , Just follow below link http://www.facebook.com/discussexcel