Macro-Return Blank Cell

S

Sudipta Sen

I am creating an Invoice by the help of macro where I want to clear all the
data from unlock cell after entering the buttom named NEXT or OK.So I could
enter fresh data in the same unlock cell.

How it possible?

Rdgs...Sudipta
 
G

Gary''s Student

Sub setup()
Dim cel As Range, r As Range
For Each r In ActiveSheet.UsedRange
If r.Locked Then
Else
If cel Is Nothing Then
Set cel = r
Else
Set cel = Union(cel, r)
End If
End If
Next

If cel Is Nothing Then
Else
cel.Clear
End If

End Sub
 
S

Sudipta Sen

Thank Gary for ur co-operation. But actually I want clear content without
disburbing my formula & format from individual cell. means from a2 , c2, a7,
d8 etc.

want to use
clear contents macro for mentioned cell.

With Loves
Sudipta
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top