Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 35,218
Default How to clear multiple cells of input data in Excel simultaneou

In xl2003 and before (not sure about xl2007), if you've disabled macros when you
opened the workbook, you'll have to close it and reopen it.

And these kinds of security settings are set by the user. If a developer could
change the security, it really wouldn't be too secure.

So...

Depending on each user's setting, they may have the same problem.

Gary wrote:

Thanks Dave, that was my problem.

However, the macro won't run as I get the Macro Disabled warning asking me
to lower my security level to allow the macro to run. I've done this, but
still can't get past that message.

Any suggestions? I'm also wondering if people I send my worksheet to will
have this same problem and be unable to run my macro. Is there a way to
prevent this also?

"Dave Peterson" wrote:

Do you have a worksheet named Sheet1 in the activeworkbook?

Change your code to match the name of the worksheet.

Gary wrote:

Duke,

I'm one step closer, but this macro won't run:
I get Run-tme error '9':
Script out of range

Sub ClearForm()
Dim c As Range
For Each c In Sheets("sheet1").UsedRange
If c.Locked = False Then
c.ClearContents
End If
Next

End Sub

What's wrong?

"Duke Carey" wrote:

sstea -

Change the line of code that reads

c.Value = ""

to

c..clearcontents



"sstea" wrote:

Thanks Corey
You rock man



"Corey" wrote:

Use this code

Dim c As Range
For Each c In Sheets("SHEET NAME HERE").UsedRange
If c.Locked = False Then
c.Value = ""
End If
Next

It will delete ALL cells values not locked in sheet selected


Corey....

"sstea" wrote in message
...
Yes, that is exactly what I want to do.

"Corey" wrote:

Does it mean to clear ALL cells in the sheet that are Not Locked ?

"sstea" wrote in message
...
I have a data input form in Excel where users enter values into unprotected
cells and view the result in a protected cell. I want the users to be able to
click a "button" to clear all of the previously entered cell input values simultaniously.







--

Dave Peterson


--

Dave Peterson
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
how to make a macro to clear multiple cells from multiple worksheets? [email protected] Excel Worksheet Functions 2 October 18th 07 04:31 PM
In Excel how can I filter multiple columns SIMULTANEOUSLY? Keleigh-G Excel Discussion (Misc queries) 5 May 25th 06 08:09 PM
how do i enter data in multiple sheets simultaneously Usman Satti Excel Worksheet Functions 2 March 15th 06 01:47 PM
Clear"Reset" data input. Frick Excel Worksheet Functions 1 March 10th 06 11:40 PM
Simultaneously change values in multiple cells? Jaclyn Excel Worksheet Functions 4 July 20th 05 05:24 PM


All times are GMT +1. The time now is 04:36 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"