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: 4
Default Copying all whilst Range Forbidden active

Hi,

Excel 2003, little knowledge. I'm using VBA below to protect my
worksheet as I have found that using the standard Protect Cells stops
me from using a scroll bar on the page. I have now gone a little
further and wanted to Copy All and Paste Values to remove all formulas
so the page can be archived and outside refernce tables be changed
without affecting past information. Of course I've now hit the
problem that I cant Copy All because I have the Range Forbidden
Active! anu suggestions?

Private Sub Worksheet_SelectionChange(ByVal Target As Range)
Dim rgForbidden As Range


Set rgForbidden = Union(Range("A2:D56"), Range("C2:F2"),
Range("E8:U9"), Range("E10:E56"), Range("G10:G56"), Range("I10:I56"),
Range("K10:K56"), _
Range("M10:M56"), Range("O10:O56"), Range("Q10:Q56"),
Range("W1:BC200"), Range("B58:R62"), Range("B66:R70"),
Range("B66:R70"), Range("B74:R78"), _
Range("B82:R86"), Range("B90:R94"), Range("B98:R102"),
Range("B106:R110"), Range("T10:U56"))


If Intersect(Target, rgForbidden) Is Nothing Then Exit Sub
Range("A1").Select


End Sub


Many thanks

Don



 
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
Site for some reason, and forbidden alagmy Excel Worksheet Functions 0 May 6th 10 10:22 PM
getting the selected range and active cell of a non active worksheetsheet GerryGerry Excel Programming 7 September 23rd 09 05:22 PM
Getting Range whilst looping through files in directory George Excel Programming 1 March 30th 06 04:15 PM
easy way to check for forbidden characters? Ouka[_26_] Excel Programming 2 December 21st 05 10:01 PM
MACRO for copying active sheet without using a certain name Tami[_4_] Excel Programming 3 July 27th 04 04:47 AM


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