bearcub
Well-known Member
- Joined
- May 18, 2005
- Messages
- 734
- Office Version
- 365
- 2013
- 2010
- 2007
- Platform
- Windows
I have the following code that I need to modify.
Certain members do not want their address and phone published in our annual directories - they want to be excluded. I have a do not publish sheet which will prevent their personnel information from being printed. what I would like to do is have the user select a cell from the current sheet and then have that name pasted onto the do not publish sheet.
How would this be tweaked so that the name or reference to the name is copied and pasted onto the do not publish sheet?
I realize that their isn't a reference to column B on the "Do Not Publish - Contacts sheet". I ran the code as is, pointed to a cell on the active sheet and nothing happened.
Thank you for your help,
Michael
Certain members do not want their address and phone published in our annual directories - they want to be excluded. I have a do not publish sheet which will prevent their personnel information from being printed. what I would like to do is have the user select a cell from the current sheet and then have that name pasted onto the do not publish sheet.
How would this be tweaked so that the name or reference to the name is copied and pasted onto the do not publish sheet?
Code:
Sub DoNotPublish()
Dim res As String
res = Application.InputBox("Enter Members name who doesn't what their personal information published")
Sheets("Do No Publish - Contacts").Cells(Rows.Count, 2).End(xlUp).Value = res
End Sub
I realize that their isn't a reference to column B on the "Do Not Publish - Contacts sheet". I ran the code as is, pointed to a cell on the active sheet and nothing happened.
Thank you for your help,
Michael