![]() |
![]() |
![]() |
|||||
![]() |
![]() |
![]() |
![]() |
![]() |
|||
| Welcome
to Tech Support Forum home to more then 136,000 problems solved. Issues
have included: Spyware, Malware, Virus Issues, Windows, Microsoft,
Linux, Networking, Security, Hardware, and Gaming Getting your
problem solved is as easy as: 1. Registering for a free account 2. Asking your question 3. Receiving an answer Registered members: * See fewer ads. * And much more..
|
| Want to know how to post a question? click here | Having problems with spyware and pop-ups? First Steps |
|
|||||||
| Microsoft Office support MS Office support forum |
![]() |
|
|
LinkBack | Thread Tools |
|
|
#1 (permalink) |
|
Registered User
Join Date: Oct 2004
Posts: 203
OS: Win XP
|
I have an excel spreadsheet that I want to print out. I want everything to be exactly the same on each print out, except for a name.
I have 25 different names I want to be in 1 cell. Each different name would be by itself. I need to print this out once every week. I don't want to copy and paste it into different sheets becasue I want to be able to change the setup on the sheet and have it affect every sheet except for the name area. Any idea's on how to accomplish this?
|
|
|
|
| Important Information |
|
Join the #1 Tech Support Forum Today - It's Totally Free!
TechSupportForum.com is a leading support website for your computer needs. We offer free, friendly and personalized computer support. Why pay to have your computer fixed when you can do it for free. Join TechSupportforum.com Today - Click Here |
|
|
#2 (permalink) |
|
Moderator/ Rangemaster TSF Academy; Analyst, Security Team; Oor Wullie; TSF Surgeon and Resident Comic
|
Hi
Some questions I'm afraid. What is the cell address? How is this cell populated - by hand, by code, the result of a formula or what? I take it you are referring to just one sheet and want to change one cell value 25 times, once each time before printing? Or have I misunderstood? Please tell me as much as you can about your setup and what you require.
__________________
Iain - Defender of the Haggis and all things Scottish. I don't help by PM - post in the Forums. ![]() ![]() PC Safety & Security::PC running a bit slow?::Donate::Photographers Corner |
|
|
|
|
|
#3 (permalink) | |
|
Registered User
Join Date: Oct 2004
Posts: 203
OS: Win XP
|
Quote:
The cell address is A3. I have a list of 25 names I could place them on an excel sheet to be populated or I could put it in the code. The names will not change. What would be best? You haven't misunderstood. I need 25 of the same sheet except each sheet has a different name in A3. |
|
|
|
|
|
|
#4 (permalink) |
|
Moderator/ Rangemaster TSF Academy; Analyst, Security Team; Oor Wullie; TSF Surgeon and Resident Comic
|
Hi Lindsey
This should work nicely - I've used the Before_Print event to change the value of A3 to a name in the list, then print the sheet before moving on to the next name. The code goes in ThisWorkbook Module. Code:
Private Sub Workbook_BeforePrint(Cancel As Boolean)
Dim myRng As Range
Set myRng = Sheets("Sheet1").Range("A3")
Sheets("Sheet1").Range("K1").Activate
Do Until IsEmpty(ActiveCell)
myRng.Value = ActiveCell.Value
ActiveSheet.PrintOut copies:=1
ActiveCell.Offset(1, 0).Activate
Loop
End Sub
Let me know if this works.
__________________
Iain - Defender of the Haggis and all things Scottish. I don't help by PM - post in the Forums. ![]() ![]() PC Safety & Security::PC running a bit slow?::Donate::Photographers Corner |
|
|
|
![]() |
| Thread Tools | |
|
|