LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 153
Default Memory Overflow issue (clear worksheet that has Worksheet_Change action)

Hi,

I've got an overflow error that I don't know how to deal with. High
level: I'm clearing all contents and formats from a sheet, and then
copying/pasting all (updated) contents and formats from another
workbook/sheet (first section of code below) The Target worksheet
(the one being cleared and pasted into) has Worksheet_Change code that
I've just added (second bit of code below). When the cells on the
Target sheet are cleared, it triggers the Worksheet_Change event, and
I get the overflow error. Any thoughts as to why, and more
importantly, how to deal with this? Thanks!

With wksSource
wksTarget.Cells.ClearContents
wksTarget.Cells.Interior.Pattern = xlNone
.Cells.Copy wksTarget.Cells(1)
End With 'wksSource


Private Sub Worksheet_Change(ByVal Target As Range)

Dim iCol As Long
Dim iRow As Long
Dim myNotes As String

If Target.Cells.Count 1 Or IsEmpty(Target) Then Exit Sub

[more code here, but it dies at the first line]

Frank
 
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 clear clipboard memory? Eric Excel Discussion (Misc queries) 2 April 6th 10 06:09 PM
Clear Cells and Worksheet_Change Q Sean Excel Programming 2 October 23rd 07 11:17 PM
Excel ODBC query tables memory overflow Gregory[_4_] Excel Programming 9 September 29th 05 08:49 AM
Do you wish to clear clipboard memory? WendyUK Excel Programming 2 February 4th 05 01:51 PM


All times are GMT +1. The time now is 06:46 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"