PC Review


Reply
Thread Tools Rate Thread

how to copy as I type and then lock?

 
 
beeblemonster
Guest
Posts: n/a
 
      29th Jul 2008
Hi!

I'm writing a very large excel file and I need certain columns to be copied
into another tab as I type them, or press enter after each cell.
It's the first two columns of the first tab and I need them to be copied tp
the second tab and then locked in the second tab, but open to edit in the
first tab.

I tried using a macro but I really screwed it up.
Please help!!!

thanks!
 
Reply With Quote
 
 
 
 
Gary''s Student
Guest
Posts: n/a
 
      29th Jul 2008
This is an example that you modify to suit your needs. There are two tabs s1
and s2. The users edits cols A & B in s1. After each change, the contents
of s1 are copied to s2 and s2 cols A & B are then protected:

Private Sub Worksheet_Change(ByVal Target As Range)
s = "A:B"
Set r = Range(s)
Set t = Target
Set s1 = Sheets("s1")
Set s2 = Sheets("s2")
If Intersect(t, r) Is Nothing Then Exit Sub
s2.Unprotect
s2.Range(s).Locked = False
s1.Range(s).Copy s2.Range(s)
s2.Range(s).Locked = True
s2.Protect
End Sub

--
Gary''s Student - gsnu200796


"beeblemonster" wrote:

> Hi!
>
> I'm writing a very large excel file and I need certain columns to be copied
> into another tab as I type them, or press enter after each cell.
> It's the first two columns of the first tab and I need them to be copied tp
> the second tab and then locked in the second tab, but open to edit in the
> first tab.
>
> I tried using a macro but I really screwed it up.
> Please help!!!
>
> thanks!

 
Reply With Quote
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
how do i un-lock word so I can type cissy Microsoft Word New Users 1 24th Apr 2008 10:12 AM
How can I copy a value type dynamically without knowing the type. =?Utf-8?B?Um9iZXJ0IE1hdGhlc29u?= Microsoft Dot NET Framework 7 14th Dec 2004 10:05 AM
I can't type anything because it says this document has been lock. =?Utf-8?B?TGF1cmVu?= Microsoft Access 2 12th Nov 2004 05:49 PM
Don't Lock Type Objects! Nashat Wanly Microsoft C# .NET 0 6th Jul 2004 09:04 AM
Can't Lock in To Font Size And Type in OE 6 BURT Microsoft Outlook 1 11th Jul 2003 01:17 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 05:59 PM.