[mso] Re: Change Events in Excel
- From: joby john <john_joby@xxxxxxxxx>
- To: mso@xxxxxxxxxxxxx
- Date: Sun, 28 Oct 2007 15:17:03 -0700 (PDT)
Geoff,
Please copy and paste following code and try
I have assumed that the title "Name "and "Position" is in A1 and B2
ur input are in A2 and B2
Private Sub Worksheet_Change(ByVal target As Range)
If target.Address = "$B$2" Then
Range("b3").Select
Selection.EntireRow.Insert
Range("A2:B2").Select
Selection.Copy
Range("a3").Select
Selection.PasteSpecial Paste:=xlPasteValuesAndNumberFormats, Operation:= _
xlNone, SkipBlanks:=False, Transpose:=False
Application.CutCopyMode = False
Range("b1").Select
End If
End Sub
Regards
John
Geoff Culbertson <glio@xxxxxxxxxxxx> wrote:
John et al,
I have two columns with headers of Name & Position on a form and two rows
below this.
I believe it is possible to attach a change event macro to the first cell
below the Name header so that when an editor adds data in that cell it
automatically adds another row below the second row which is formatted in
the same way. It doesn't matter if there is always a blank row at the bottom
of this table.
I have seen similar examples where there is a button to add another row, but
think it is possible to automate this.
Does this make more sense?
Regards
Geoff Culbertson
Petersfield, UK
-----Original Message-----
From: mso-bounce@xxxxxxxxxxxxx [mailto:mso-bounce@xxxxxxxxxxxxx] On Behalf
Of joby john
Sent: 27 October 2007 06:14
To: mso@xxxxxxxxxxxxx
Subject: [mso] Re: Change Events in Excel
Geoff
Can I have more details on this please, may be detail example as to what u
need
John
Geoff Culbertson wrote:
I believe that it is possible for a macro to be started when data is
inserted in a cell in Excel.
I have a protected worksheet that when the user enters data into a cell, I
would like a macro to automatically copy and insert a row below the row that
data has been entered in. I think that a change events macro could do this,
but have not found any code which I can adapt to do this. Can anyone help
please?
e.g. C1 = Name and D1 = Position
C2 is blank and D2 is blank
C3 is blank and D3 is blank
When data is entered in C2, I would like row 3 to copied and pasted as row 4
and then if data is inserted in C3, row 4 is copied and pasted as row 5, and
so on.
--
Geoff Culbertson
Petersfield, UK
*************************************************************
You are receiving this mail because you subscribed to mso@xxxxxxxxxxxxx or
MicrosoftOffice@xxxxxxxxxxxxxxxx
To send mail to the group, simply address it to mso@xxxxxxxxxxxxx
To Unsubscribe from this group, visit the group's homepage and use the
dropdown menu at the top. This will allow you to unsubscribe your email
address or change your email settings to digest or vacation (no mail).
http://www.freelists.org/webpage/mso
To be able to share files with the group, you must join our Yahoo sister
group. This group will not allow for posting of emails, but will allow you
to join and share problem files, templates, etc.:
http://tech.groups.yahoo.com/group/MicrosoftOffice . This group is for FILE
SHARING ONLY.
If you are using Outlook and you see a lot of unnecessary code in your email
messages, read these instructions that explain why and how to fix it:
http://personal-computer-tutor.com/abc3/v28/greg28.htm
*************************************************************
__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com
*************************************************************
You are receiving this mail because you subscribed to mso@xxxxxxxxxxxxx or
MicrosoftOffice@xxxxxxxxxxxxxxxx
To send mail to the group, simply address it to mso@xxxxxxxxxxxxx
To Unsubscribe from this group, visit the group's homepage and use the
dropdown menu at the top. This will allow you to unsubscribe your email
address or change your email settings to digest or vacation (no mail).
http://www.freelists.org/webpage/mso
To be able to share files with the group, you must join our Yahoo sister
group. This group will not allow for posting of emails, but will allow you
to join and share problem files, templates, etc.:
http://tech.groups.yahoo.com/group/MicrosoftOffice . This group is for FILE
SHARING ONLY.
If you are using Outlook and you see a lot of unnecessary code in your email
messages, read these instructions that explain why and how to fix it:
http://personal-computer-tutor.com/abc3/v28/greg28.htm
*************************************************************
--
No virus found in this incoming message.
Checked by AVG Free Edition.
Version: 7.5.503 / Virus Database: 269.15.11/1094 - Release Date: 26/10/2007
08:50
*************************************************************
You are receiving this mail because you subscribed to mso@xxxxxxxxxxxxx or
MicrosoftOffice@xxxxxxxxxxxxxxxx
To send mail to the group, simply address it to mso@xxxxxxxxxxxxx
To Unsubscribe from this group, visit the group's homepage and use the dropdown
menu at the top. This will allow you to unsubscribe your email address or
change your email settings to digest or vacation (no mail).
http://www.freelists.org/webpage/mso
To be able to share files with the group, you must join our Yahoo sister group.
This group will not allow for posting of emails, but will allow you to join and
share problem files, templates, etc.:
http://tech.groups.yahoo.com/group/MicrosoftOffice . This group is for FILE
SHARING ONLY.
If you are using Outlook and you see a lot of unnecessary code in your email
messages, read these instructions that explain why and how to fix it:
http://personal-computer-tutor.com/abc3/v28/greg28.htm
*************************************************************
__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com
*************************************************************
You are receiving this mail because you subscribed to mso@xxxxxxxxxxxxx or
MicrosoftOffice@xxxxxxxxxxxxxxxx
To send mail to the group, simply address it to mso@xxxxxxxxxxxxx
To Unsubscribe from this group, visit the group's homepage and use the dropdown
menu at the top. This will allow you to unsubscribe your email address or
change your email settings to digest or vacation (no mail).
http://www.freelists.org/webpage/mso
To be able to share files with the group, you must join our Yahoo sister group.
This group will not allow for posting of emails, but will allow you to join
and share problem files, templates, etc.:
http://tech.groups.yahoo.com/group/MicrosoftOffice . This group is for FILE
SHARING ONLY.
If you are using Outlook and you see a lot of unnecessary code in your email
messages, read these instructions that explain why and how to fix it:
http://personal-computer-tutor.com/abc3/v28/greg28.htm
*************************************************************
- Follow-Ups:
- [mso] Re: Change Events in Excel
- From: Geoff Culbertson
- References:
- [mso] Re: Change Events in Excel
- From: Geoff Culbertson
Other related posts:
- » [mso] Change Events in Excel
- » [mso] Re: Change Events in Excel
- » [mso] Re: Change Events in Excel
- » [mso] Re: Change Events in Excel
- » [mso] Re: Change Events in Excel
- » [mso] Re: Change Events in Excel
- » [mso] Re: Change Events in Excel
- » [mso] Re: Change Events in Excel
- » [mso] Re: Change Events in Excel
- » [mso] Re: Change Events in Excel
- » [mso] Re: Change Events in Excel
- » [mso] Re: Change Events in Excel
- » [mso] Re: Change Events in Excel
- » [mso] Re: Change Events in Excel
- » [mso] Re: Change Events in Excel
- [mso] Re: Change Events in Excel
- From: Geoff Culbertson
- [mso] Re: Change Events in Excel
- From: Geoff Culbertson