Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Problems clearing a cell

I have problems clearing a range of cells with a excel macro.

I am using excel 97.

The code that I use is:
Sub test()
Range("N38:N98").Clear
Range("P38:P98").Clear
Range("R38:R98").Clear
End Sub

In most of my worksheet this works fine but in one worksheet this code
does not work the macro aborts after having preformed the first line.
The range n38:n98 is actually cleared but after doing this the macro
stops without any messages. The cells are not protected in any way.

I don't know what I am doing wrong, can anyone help me with this
problem.

greet Ralph
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 15
Default Problems clearing a cell

Are there any merged cells in the column of "N", "P" and "R"?

"Ralph Private" ?????
m...
I have problems clearing a range of cells with a excel macro.

I am using excel 97.

The code that I use is:
Sub test()
Range("N38:N98").Clear
Range("P38:P98").Clear
Range("R38:R98").Clear
End Sub

In most of my worksheet this works fine but in one worksheet this code
does not work the macro aborts after having preformed the first line.
The range n38:n98 is actually cleared but after doing this the macro
stops without any messages. The cells are not protected in any way.

I don't know what I am doing wrong, can anyone help me with this
problem.

greet Ralph



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 13
Default Problems clearing a cell

On 1 Aug 2003 00:52:17 -0700, Ralph Private wrote:

I have problems clearing a range of cells with a excel macro.

I am using excel 97.

The code that I use is:
Sub test()
Range("N38:N98").Clear
Range("P38:P98").Clear
Range("R38:R98").Clear
End Sub

In most of my worksheet this works fine but in one worksheet this code
does not work the macro aborts after having preformed the first line.
The range n38:n98 is actually cleared but after doing this the macro
stops without any messages. The cells are not protected in any way.

I don't know what I am doing wrong, can anyone help me with this
problem.

greet Ralph


What happens when you run your code from the VB-editor using the function
key "F8"? Does it go through the lines correctly?

Perhaps you should use something like:

activesheet.range("...").clear

or

activesheet.range("...").clearcontents

SL
  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Problems clearing a cell

No the celles are not merged

Eddy wrote:

Are there any merged cells in the column of "N", "P" and "R"?

"Ralph Private" ?????
m...
I have problems clearing a range of cells with a excel macro.

I am using excel 97.

The code that I use is:
Sub test()
Range("N38:N98").Clear
Range("P38:P98").Clear
Range("R38:R98").Clear
End Sub

In most of my worksheet this works fine but in one worksheet this code
does not work the macro aborts after having preformed the first line.
The range n38:n98 is actually cleared but after doing this the macro
stops without any messages. The cells are not protected in any way.

I don't know what I am doing wrong, can anyone help me with this
problem.

greet Ralph

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
Clearing a cell based on the value of another cell (INDIRECT data) without macros Cosi About this forum 0 June 15th 10 03:30 PM
Clearing cells without clearing formulas marsjune68 Excel Discussion (Misc queries) 2 April 10th 09 07:39 PM
Clearing a cell basil Excel Discussion (Misc queries) 4 April 30th 07 11:28 AM
clearing a cell ahegg New Users to Excel 2 April 1st 06 06:41 AM
Clearing a cell frustratedwthis Excel Discussion (Misc queries) 1 May 23rd 05 09:47 PM


All times are GMT +1. The time now is 02:02 AM.

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

About Us

"It's about Microsoft Excel"