Macro Which Cycles Through User Inputted Values And Prints Sheet

Jun 21, 2014

I'm looking to create a macro which displays a user entry box where the user can input a starting number and then input an ending number. The macro will then cycle through that range inputting each value into a specific cell and perform a print function. It will continue doing this until the last number in the range.

E.g.
Min. Number inputted = 1
Max. Number inputted = 80
Macro will not cycle through that range:
Input 1 into Sheet1 Range A1
Print Page
Input 2 into Sheet1 Range A1
Print Page
.....Continue doing this until it reaches 80

View 3 Replies


ADVERTISEMENT

Detect If User Prints

Dec 12, 2006

Is there anyway to detect if the user has just printed. I have code which transfer data from the sheet to an access file when the user prints using the button I placed on the sheet, unfortunately some users are using the print button on the toolbar.

View 9 Replies View Related

Summing All Rows In A User Inputted Column

Feb 2, 2009

I need to sum all the rows, except the header row, of a column inputted by the user. The column will be located in a worksheet dubbed SourceSheet.

Here's a few pieces of code related to what I am trying to do. The header row is always row 1. So the rows I'm summing are always 2 - myrows.

View 6 Replies View Related

Changing Auto Filter Based On User Inputted Cell

Apr 7, 2007

I have a Workbook that has 2 worksheets, one called CALL QUERY and one called CALL LOG. On the CALL QUERY sheet, cell D9 is a user inputted cell with the cell validation set to list. The user uses the dripdown list to pick an office identifier (3-Letter Code).

On the CALL LOG sheet, I have info about individual calls. Column E has the 3-letter office identifier for each call.

I am trying to find a way to automatically auto filter the list on the CALL LOG sheet with the user input in cell D9 on the CALL QUERY sheet.

I was given the following (N2 is a cell on the CALL LOG sheet that equals the user inputted cell D9 on the CALL QUERY sheet)

View 14 Replies View Related

Macro That Cycles Through Sub Folders Within A Main Fold

Sep 15, 2008

i am looking to create a macro that cycles through sub folders within a main fold and takes the same line of nformation from each workbook that it cintains.

the main folder is a yearly folder "2008" there a 12 subfolders within this named "january" to "December" (one for each of the months of the year) Within the monthly folder are four weekly forlders named "week 1" to "week 4"

each of the line in the workbook ferer to a different person so i will need to transfer all of them into individual summary workbooks. but in this example i need to take the information from A3 - K3 from each workbook.

View 9 Replies View Related

When User Enters Data Into One Cell - Selected Text Prints In Another Cell

Jun 20, 2014

I am trying to do is to make it so that users can enter data into my form (I have managed to create the form and am working on trying to figure out how to get the info entered into the form to appear in my worksheet) and then the data will cause the information to, basically, compile sentences that I want to appear in one of three cells at the bottom of the worksheet.

Essentially, at this point in time, the end goal is to make 3 cells that contain text. Eventually, this text will be indexed elsewhere, but that is for the next person to deal with. I am creating a prototype that I want to present as a process improvement.

So, when the user selects 3 in cell D7 I want the text "Customer purchased 3 Widgets at $20 each." to print in cell 82B.
I also want the user to be able to copy and paste some customer records from another program directly into a cell in the form that will just print (unchanged) into one of these boxes, too.

Lastly, I want the user to be able to select checkboxes that will, when selected, print a comment that will print in two of these boxes. For example, if the user selects yes for cell D26 then I want the text "Customer not eligible for free shipping" to appear in both cells C82 and D82.

View 5 Replies View Related

Multiple Prints Form One Sheet

May 11, 2012

I work in a hospital laboratory and we are performing an antibiotic study. I have a work book consisting of 2 sheets

1 sheet is a list 7 antibiotics in a column for a1 to a8
2 sheet is a blank results sheet

What I want to do is print out the blank result sheet once for every antibiotic on sheet 1 with the name of the antibiotic in sheet 2 pos "a,1"

I have copied the blank 7 times and linked to the antibiotic list but this seems very untidy.

Is there a way to print out 7 identical sheet2's differing only by reference to sheet 1 a1 to a8.

View 1 Replies View Related

Return The Column Number Of First Column In A User Inputted Range?

Feb 19, 2009

I'm creating a macro that creates a co-ocurrence matrix from variables that are adjacent to each other.

In order to proceed, I need to know how to return the column number of the first (leftmost) column in a range that the user selects.

View 2 Replies View Related

Macro Prints In Landscape Not Portrait

Dec 18, 2008

I am using the following code written by a former employee to set a print area for 3 different ranges in my workbook. For some reason the pages are coming out in a landscape format. How do I get the macro to print in portrait?

View 2 Replies View Related

Code Prints To PDF But Can It Do So For All 3 Prints?

Feb 19, 2013

The code bellow allows for me have the current sheet saved "printed" to a pdf file with name taken from a cell value.

After that it also prints 3 hard copies with a cell value being changed for each print.

Can I have this but on the pdf code so that the 3 pages are also saved "printed" to pdf?

Code:
'Selects doPDF to genarate PDF file of invoice and names it accordingly to cell L17 which is the invoice number. Application.ActivePrinter = "doPDF v7 on DOP7:"
ActiveSheet.ExportAsFixedFormat Type:=xlTypePDF, Filename:= _
"E:LusaGenerated InvoicesINV" & Range("L17").Text & ".pdf", _
Quality:=xlQualityStandard, IncludeDocProperties:=False, IgnorePrintAreas _
:=False, OpenAfterPublish:=False

[Code] .......

View 1 Replies View Related

How To Get User To Select A Sheet And Use It Later In Macro

Oct 10, 2013

I have a workbook with several sheets. I have written a macro to check if the value in a column is matching with that in another column in another sheet and return the value in a preceding column in the second sheet into a preceeding column in the first sheet. The code looks likes this and seems to be working fine.

Sub Copy_Price_Code()
Dim Rw As Long
For Rw = 6 To Sheet6.UsedRange.Rows.Count

[Code] ....

However, there would be more sheets in the workbook in future and I need to edit the macro in such a way that the user can select the source and destination sheets which I could use in the above macro. I tried to do it as follows but its not working.

Sub Copy_Price_Code()
Dim Rw As Long
Dim Rw2 As Long
Dim Sourcesheet As String
Dim Destinationsheet As String
Sourcesheet = InputBox(Prompt:="Enter source sheet name. (example: Sheet1).", _

[Code] .......

View 3 Replies View Related

Userforms: User Macro Permanently Changes Userform Values

Feb 3, 2010

There is a macro i wrote that assigns buttons to different tasks, and it changes the name of each button to whatever task the user utilizes it for. I would like for the changes to be permanent, and i can do it if i can just keep the information in the userform. So, the most logical solution is to permanently change the names of the buttons in the userform, but this has to be accomplished by the users choice, which means i don't do it through the vbe. How do you change a button's caption permanently through macro?

View 9 Replies View Related

Saving User Inputted Data From A Worksheet To Another Worksheet And Saving It

Jan 7, 2009

I have created a form in a worksheet which I have added questions too and then locked all cells except the ones where I want the answers in.

I have then added a button to the bottom of the sheet called "Print and Save". This work sheet is called "form"

On a second sheet called "database", I have all the titles of the questions running from a -> k and nother else.

What I want to happen is the user input the information on "form" into the boxes available. Once they have completed the questions, I want them to be able to click on "Print and Save" so that firstly the page "form" prints, and then for all of the answers to be saved in "database" below the titles for each question.

I have had a play, but just don't know where to start. Also, once there is a row of questions below the titles, I don't want it to overwrite information already there, it needs to go onto the next empty row available.

Attached is my excel file.

You will see in the code that I have the code for printing.. I just found this on the net and it seems to work fine for me.

View 9 Replies View Related

Progress Bar Freezing Up Cpu Cycles

May 10, 2006

I have a progress bar on a form......it is there for no reason other than for me to practise such things...the code came off these forums and the bar is powered by a random number...

now my problem is the moment it start running i cannot do anything on the form....i would like my bar to do it's thing but still be able to click on the cancel button to get out of the form any help on this would be fantastic

Private Sub UserForm_Activate()
Dim dTime As Date
Dim i As Integer

Do Until i = 100
For i = 1 To 100 Step 100 / 8
dTime = Now + TimeValue("0:00:01")
Application.Wait TimeValue(dTime) '
ProgressBar1.Value = RandNumGen(1, 98, 1)
'AboutScreen.Repaint
Next i
'AboutScreen.Repaint
Loop

End Sub

View 5 Replies View Related

Prompt User To Open Sheet As Macro Enabled - VBA

Jun 19, 2013

I have got a protected sheet with macros, how can I ensure that users can only open the sheet as Macro enabled only otherwise the sheet would not open?

I understand that some users may have different Macro security settings?

View 1 Replies View Related

Macro To Read User Input For Sheet Locations

Jan 22, 2010

I'm working with a workbook that has about 75 sheets. I need a macro that will copy the info in a certain couple of ranges from one sheet to the same ranges in another. This would not be a problem if it was always the same two sheets. But I need the user to be able to specify which sheet he wants to copy from and which sheet he wants to copy to.

The ranges on the sheets will always remain the same, just the sheet name needs to change. I created drop down boxes for the user to choose the copy from and copy to sheets, but I don't know how to insert that into the VBA code. The way I've designed it, the macro needs to read the result from the user that is on sheet "Index" in cell H5 to copy from and N5 to copy to. The result in those cells is the actual sheet name.

Here's the simple part of the code so far:

Sheets("MM Ades 64z").Select
Range("B8:B59").Select
Selection.Copy
Sheets("MM Pnch 64z").Select
Range("B8:B59").Select
ActiveSheet.Paste
Sheets("MM Ades 64z").Select
Range("D8:D59").Select
Selection.Copy
Sheets("MM Pnch 64z").Select
Range("D8:D59").Select
ActiveSheet.Paste
Sheets("MM Ades 64z").Select
Range("J8:O59").Select
Selection.Copy
Sheets("MM Pnch 64z").Select
Range("J8:O59").Select
ActiveSheet.Paste
Sheets("TMMC").Select
Range("M1").Select
End Sub

View 9 Replies View Related

Macro To Compare Values In User Specified Columns And Return To Different Workbook

Feb 21, 2014

I am trying to create a macro that will compare several un-formatted workbooks and copy just what I want to a workbook of my one.

I start by having 2 different workbooks opened ("Main" and "Change") side by side like this: 1.jpg

Then i run the macro in my "Main" workbook and it should appear an Userform like it showed in the image below: 2.jpg

This is so that i can manually fill the user form with the correct columns by looking at the excel file, for example:
Ref=E3;City=G3; Data=I3.

Pressing Ok, it fill the "Main" workbook with the matching information so it and closes the "Change" workbook.

At the moment my code is in this stage:

VB:
Private Sub CommandButton1_Click()
myfile = "C:Userssst1brgDesktopRelatorios" & TextBox1.Value
Application.Workbooks.Open Filename:=myfile
Windows.Arrange ArrangeStyle:=xlVertical

[Code] .....

But I am stuck because there isn't any error and nothing happens.

View 1 Replies View Related

Macro That Allows The User To Copy And Paste A Set Of Date And Time Values

Sep 18, 2009

I am trying to develop a macro that allows the user to copy and paste a set of date and time values, move them to the next sheet and increase the month by 1. I need help trying to find out how can I create a counter for the program to keep running without the need to reprogram the macros again.

View 14 Replies View Related

Auto Text Based On Cycles And Days

Nov 12, 2013

Auto text based on "cycle" and "day"

I need to auto populate cells based on a rule let's say:

Each cycle is 28 days so on day 1, the first cell should say "C1D1", next day "C1D2" and so forth so that on day 28th (cell 28) it should be C1D28.

On day 29, it should say, "C2D1" since it's the beginning of the next cycle on day 1. What formula do I use?

View 4 Replies View Related

Exl2K User: Sheet Is Password Protected But User Can Change Color In Unlock Cells

Jun 16, 2006

find attached zip file . if you open the file then you can understand the problem.

I need to change cells color and text color as per user choice in Password protected sheet : (user is useing excl2000)

Kindly open attahced file i putted the note inside the file.

View 3 Replies View Related

Inserts New Row And Also Inserts New Sheet With The Rows Name That Was Inputted

Jan 8, 2007

(1) My main tab I have a macro button that inserts a new row and also inserts a new sheet with the rows name that was inputted. But on the main tab in cell A1 that is named, I can not get it to hyperlink to the new tab.

(2) When the button is hit to insert a new row and sheet I copy over previous tabs information and then I want to change two fields A1 and B1, A1 works fine but my B1 I can not get the formula to work correctly. My cell in B1 I need it to say 'DESCRIPTION: ' and then take the value of main tab 'Test Case Summaries' cell D?, it would be the new line and copy it here. See below... rname is the new tab name and lrow is the new row that was added when the macro button is hit.

t = Sheets.Count
Sheets(t).Copy after:=Sheets(t)
ActiveSheet.Name = rname

Sheets(t + 1).Range("a1") = ("Test Nbr " & rname)

Sheets(t + 1).Range("b1").Formula = "DESCRIPTION: " & "!$D$" & lrow

View 9 Replies View Related

Autofill Cells On One Sheet When Cells On Another Are Inputted

Mar 21, 2007

I have got the task of doing the results for a local athletics mid-distance event once again and im fed up of doing it the present way. Basically i have a sheet which i input the race registrations which has the following collums: Number, Name,School,

and i have another sheet for results which have: Position,Number,Time. I then have to merge the two in a magical way and i get the results. However what i want to do is have the first sheet the same but the results sheet would be different reading: Postion,Number,Name,School, Time

But when i input the number, it will check with the other sheet and automatically fill the rest of the boxes (bar position and time) hopefully. Using my knowlegde i gathered at college(fairly average knowledge of vb) i still cant get it to work the way i planned. Is it actually possible to do, or should i go to my pet hate access?

View 2 Replies View Related

Macro Paste- Macro To Get The Values From Cells D29 And H24 In The Resource Calculator Sheet

Sep 17, 2009

I need a macro to get the values from cells D29 and H24 in the Resource Calculator sheet and populate it into cells N8 and O8 in the Input form.

Users will then be able to change the information in the calculator and click the macro again to populate N9 and O9 and so on.

Is there a way to do this?

I've attached the file for you to see.

View 13 Replies View Related

Macro To Paste Values Instead Of Formula When User Uses Ctrl-C And Ctrl-V (no Command Button)

Jun 10, 2013

I was thinking of how the Worksheet_Change(ByVal Target As Range) macro can be used to paste values instead of formula when the user uses Ctrl-C and Ctrl-V. Instead of assigning a macro to a command button for user to activate.

Suppose I have a worksheet where the range ("D7:D56") is where I would want the user to paste his values in it.
I have to factor in the possibility that these values have formulas attached to them, and that the user is not tech-savvy enough to know about the "paste special --> values" functionality of excel, and chooses to use the Ctrl-C, Ctrl-V method instead.

What then appears are ####### which might alarm the user.

Neither would we want the user to press a button (which we can assign the xlpastevalues macro as an alternative) as that adds an extra step for the user. There is also a chance the user might not use the button, or overlooked it.

Is it possible to use the Worksheet_Change(ByVal Target As Range) macro, or sth similar, to paste values instead of formula when user uses Ctrl-C and Ctrl-V?

View 6 Replies View Related

Macro To Link Cell To Sheet & Cell Stated By User

Jun 3, 2008

I have a macro that inputs a sheet and cell from the user. when the macro tries to make a formula it outputs =data!'AE3'. I need it to output =data!AE3

Dim Sheet As String
Sheet = InputBox("Take Data from where?")
Dim startcell As String
startcell = InputBox("Start Cell?")

ActiveCell.FormulaR1C1 = "=" & Sheet & "!" & startcell & ""

View 3 Replies View Related

How To Change File After It Prints

Mar 26, 2014

is there a function to change the file after it prints?

here is my issue, im printing out P.O.'s at work (purchase orders) and i have to put the P.O. number in manually. so i put in say 1601 then i arrow down till i hit the second p.o. number box (2 p.o.'s per page) and then enter 1602 then hit control + P to print then click back at the top and repeat but changing the number to 2 more than the number previously in the box.

is there some what to do this automatically so i dont have to do it my self?

View 3 Replies View Related

File Location For Screen Prints

Jun 30, 2006

I am trying to write a macro which does a screen print of a couple of sheets in a spreadsheet. I created the macro using the recorder function and then trimmed it down a bit. However, when I run the macro it pops up with the box asking for a file location, and this is not something that the recoder function seems to write into the macro. I am not sure how to have the macro autofil the file location for the screen print. Is there anyone out there who can give me a hand with this? Thanks. The code for the macro is below...

Sub ScreenPrint()
Sheets( Array("Sheet1", "Sheet2", "Sheet3")).Select
Application.ActivePrinter = "Microsoft Office Document Image Writer on Ne00:"
Selection.PrintOut Copies:=1, ActivePrinter:= _
"Microsoft Office Document Image Writer on Ne00:", Collate:=True
Sheets("Sheet1").Select
End Sub

View 3 Replies View Related

Cell Text Prints, But Isn't Seen On Screen

May 2, 2007

For example, a cell on the screen is blank. When the page is printed, the "blank cell" has printed text.

I checked "format cells" and it shows word wrap, merge cells, and left to right.

I was told to "un-merge" the cells. I did that and I still have the problem.

The color on all the cells is OK at a blue shade. When I look at print preview the cells are blank, but when the sheet is printed, the text shows.

Also, it looks like there are 2-3 cells inside the main cell.

I hope I have explained this properly, it is not easy to use the correct language to describe since I am not very good at using Excel.

View 7 Replies View Related

Hp Printer Prints Blank Pages

Jun 14, 2007

When printing an Excel workbook/Worksheet that has been emailed via Lotus notes 7.02 the print job is all blank pages - PrintPreview is normal and correct - Page Breaks are set correctly - The correct number of pages are printed but, ALL Pages are blank. The printer is an HP 6310 All-in-One connected locally via USB. If Printed to Adobe, ALL pages are correct and can be printed on the HP 6310. If another printer is selected (ie: Any Network Printer) the results are the same. This occurrs only on certain spreadsheats received from only a few users.

View 3 Replies View Related

Macro To Copy Sheet(s) And Paste As Values Only

Nov 29, 2011

I am looking for a macro that will copy a worksheet to a new workbook and 'paste as values only' - this is because I already have a macro that I am trying to use to 'autofilter' the sheet to only show rows and colums that have entries in them. Since the sheet is dynamic, the macro will not work unless I copy and paste as values only...

Workbook attached - FYI, the 2 sheets in the workbook are actually in 2 separate books, I have just put them together to make it easier to post here...

View 3 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved