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?
I have a document needed to be printed with some pages in the middle in landscape page type, the rest in portrait. If using Word it would be easier, but in Excel I cant find the section break to chage page setup separately. Is there anyway to do it. Currently I'm printing the document separately in portrait and then landscape with some page break added and page number modified. However it's quite troublesome and easy to make mistake.
I'm using the select sheets to print code from: http://j- walk.com/ss/excel/tips/tip48.htm. I need to add in another option to select whether to print the page as horizontal or landscape. I've been able to add the checkbox, but am having a hard time with the loop to process correctly. I also have the landscape changing code as well. Here is my Option Explicit Sub SelectSheets() Dim i As Integer Dim TopPos As Integer Dim TopPos1 As Integer Dim SheetCount As Integer Dim PrintDlg As DialogSheet Dim CurrentSheet As Worksheet Dim cb As CheckBox Application.ScreenUpdating = False If ActiveWorkbook.ProtectStructure Then MsgBox "Workbook is protected.", vbCritical Exit Sub End If Set CurrentSheet = ActiveSheet............
When I view a sheet under Page Break Preview, it shows the Page numbers in the centre of the Page. While I am aware that it would not print the page number I was wondering if there is an option to remove/hide the page numbers.
how to get rid of the page numbers that appear when using page break preview mode. The page numbers appear in large grey font in the middle of each page and sometimes makes it difficult to read cells. Can I use this view with all the same functionality without that one feature?
See attached file. A colleague is downloading rows of data from a website which contains a number field Excel is currently treating as Text after being pasted in. My spreadsheet includes just a sample of the many rows of data however as you can see the VALUE function refuses to convert these text values to numbers. How these might be converted and why the VALUE function refuses to work in this case?
below is my coding, it inserts a picture into a cell and fits to what ever the cell size is.
my cells are more landscape (fixed) than portrait, how can i still make the images fit into the cell height wise but keep a aspect ratio of a portrait picture.
Sub InsertPicture1() Dim myPicture As Variant myPicture = Application.GetOpenFilename _ ("Pictures (*.gif; *.jpg; *.bmp; *.tif),*.gif; *.jpg; *.bmp; *.tif", , "Select Picture to Import") If myPicture = False Then Exit Sub Application.ScreenUpdating = False
I would like to be able to copy an invoice from a web page, paste it into Excel and then run a macro on it that will strip away all unwanted lines. That much I have gotten fine. Obviously, part of this invoice is numbers (Qty, Unit Cost, Total Cost, etc.) but when my macro is complete these numbers are all stored as text.
What steps would I need to add to convert these numbers to numbers? I would like for this to all happen within the macro. This completed spreadsheet would then be linked to a table in Access where calculations will need to be performed.
I am trying to set up excel sheets for documents that we print often. I would like to print them with page numbers in right footer that increases sequentially.
setting up a macro. But very time I print it starts from same number instead of the number after where I left off. Example: if I print today with page numbers 1 through 12, next time I want it to print number 13 through whatever no of copies printed.
Here is the code I copied from one of the threads here:
I need the page number in right footer and also the macro to save the last number printed.
I have a workbook that has a single sheet in it, in cell G2 I want to insert a page number where if I print of multiple copies on the first sheet it will say 1, the second 2, the third 3 and so on and so forth.
I have a single page spreadsheet. I want to print multiple copies and have a unique invoice number on each page printed in cell O1. I don't want to just send it to the printer as individual print jobs. I would like to send it to print as a pdf in a single 100 page document or if not a pdf then just as a multiple page document.
For example first print run would start at number 1001 and last numbered page is 1101.
I would like to know if there is a way to print several different workbooks at once but keeping my printing format which I would like to be Landscape and Fit to one page. Reason is simple as I work in a office where staff is handed in several jobs to do everyday. They finish the jobs and log all the info on the database. I log on to database and put all their daily diaries and because it is all over the place I have to go in each file and set printing preferences which takes an hour in the morning and hour in the evening. I could do with some sort of automation where all diaries are automatically printed in Landscape and Fit on one page.
I have some code that parses an html table. I want to put in error handling in case the format of the page changes or the internet page is unavailable. I am testing without an internet connection and the run time error is not being branched off to the error handler and is fatally ending the macro. This is true also if I raise an error manually.
Private Sub ParseInjuryPage() On Error Goto ErrorHandl Dim strPage As String Dim webIE As SHDocVw.InternetExplorer Dim myURL As String Dim tableBeg As Long Dim tableEnd As Long Dim RowBeg As Long Dim rowEnd As Long Dim cellBeg As Long Dim cellEnd As Long Dim strBeg As Long Dim strEnd As Long Dim myCell As Range Dim rowNum As Integer With Sheets("INJ") Set myCell = .Range("A2") .Range("A:F").Value = vbNullString rowNum = 2 Set webIE = New SHDocVw.InternetExplorer myURL = "http://www.sportsline.com/nfl/injuries" webIE.Navigate myURL Do Until webIE.ReadyState = READYSTATE_COMPLETE DoEvents Loop strPage = webIE.Document.body.innerhtml...................................
I have a sheet that changes the number of columns based on data from other sheets. This is the only sheet in the workbook that I will print out every day. I have it set right now to fit all columns on one page, however sometimes this will result in the bottom 1/3rd of the sheet not being used. If I use fit all rows on one page, then some of the columns will get cut off. Is there a way to scale in both directions? My guess is there is not, but I thought I would ask because it would work great for me if I could.
I have a report that I use and right now I have a command button that prints the report x2. What I would like to do is to have it print one in color and one in grayscale. I could do this I think with two different buttons, but I would like to utilize just one. I tried creating a macro but it did not pick up the fact that I changed the properties to black and white.
I am looking for a formula that will take data from one page and graph it on another page. The data I am trying to graph is arranged like so:
1 q 2009.05.01 2 w 2009.05.02 3 w 2009.05.01 4 q 2009.05.01
I am looking for something that will look at column A and if the answer is "q" and then look at column B and if the answer is "2009.05.01" Excel will take that and count it in a specific cell on another page. In the case above, I want Excel to give me the answer of "2" in a designated cell.
I have a workbook that has 9 different tabs in it. Once all the information has been completed throughout the workbook, is there a code that could transfer specific data on each page to a different colum on that same page? I need to do this for 9 pages at one time. The information is listed differently on each page. I need to transfer data from the current data column to the previous data column once the entire workbook has been filed out.