I have some code that Im trying to get to look at the sheets in my workbook and then based on if there is data in a cell and/or cells then select that sheet. Heres what I got so far thats not working. I get an error of Next without for.
It takes a specific sheet & range, uses publish object to create a HTML version of this sheet then launches the IE browser to display this to the user.
Issue: Under Windows XP, Excel 2003 & Excel 2007 this works OK. Under Vista & Excel 2007, the HTML preview file is not getting written - I get an error when IE browser tries to display this file. Error: Can not find "Print Preview.htm"
Anyone run into this on Vista? Is this a permissions issue with writing the html file? Not sure why this exact same code works under XP and not Vista.
Since upgrading to Windows 2007 (I was already using Excel 2007) I am having issues with the content in the cells on the worksheet not appearing the same on Print Preview and when I print. On the worksheet the cell show to be at the best fit both horizontally and vertically. When I look at the contents under print preview, the contents are squashed from the top and cut off from the left. This happens whether I have the format in Top or Central align and is even worse if I use Bottom align. It is also somewhat worse if I have thickened boarders.
I set up a passworded spreadsheet and saved it to my documents folder. I then copied it across to a network area I use to link to a company I work with. The file opens ok on the password but the page is completely white and I can see nothing at all! When I print preview the page I can see all my information but this doesn't help when I need to update it.
Not only that, the whole lot of excel spreadsheets I have both on my documents and the network area are doing the same thing! I've no idea how it's happened or what to do to retrieve the page view.
How do I turn them off? I go to print preview, then leave, and I have ugly lines all over the place showing where the end of the page is. My entire team can't figure it out. where I can turn this option on/off?
I need to print a number of worksheets with an office logo at the top left corner of the sheet. While I have no problem with most of the sheets, a number of them keep resizing the logo to smaller dimensions once I get to the print preview page. I don't seem to be doing anything different for these sheets as they all follow the basic template. The only was to get the logo to print at the size I want is to make it larger that I actually need it.
I created a macro that prints a label from a userform. The macro used to reside on an XP platform and performed without issues. IT decided they wanted to upgrade the machine to a Windows 7 platform. Now when the userform prints a small window pops up that looks like a print preview of the label, however it is transparent and has a window caption of 'Precut Label' as identified in the userform design. I am including a screenshot of the pop-up. The unusual thing about this is the window cannot be closed, moved or selected in any way shape or form. The only way to get it to close is to view the userform object in the vba editor. The line of code that triggers the print sequence as well as cause the pop-up is: frmLabel.PrintForm. This line of code is housed in the sheet1 object.
I have a spreadsheet which needs to be scaled down when printing (to fit 1 page wide by x tall), everything looks good in the print preview, but when PDFing, some of the columns don't seem to wrap properly and some of the words on the right side blend into the next column.
After playing around with it, if I set the column to autofit it slightly expands the column width and works correctly. Unfortunately, this will make the text too small to read by the time it is scaled down for PDFing so I have left the columns as they were.
I had a feeling that this difference between what was on screen and the end result could be due to the "printer" settings. So, because the default printer was not Acrobat, I changed the printer to Acrobat before attempting to print preview and print again. Yippee, it worked.
When I view my page on print preview it shows 2 pages but I only have stuff on one page the second page shows 2 border marks but when I go to erase them I can't find them. Is there some way that I can find them other than look at page after blank page.
I have a spreadsheet with check boxes and a combo box that are set to display in print preview as well as print. I have set up a Print Preview button on this spreadsheet, as well. When you click the Print Preview button and then click close on the preview window and return to the spreadsheet, the control toolbox tools appear out of place and are greatly magnified. Scrolling the screen down and then back makes them appear correctly once again.
I have seen this on this spreadsheet on three different computers. Does anyone have a clue what is going on?
Note, clicking the print preview button on the standard toolbar does not provide the same artifact. It works correctly.
Or for the cheap fix, what is the VB script to move the cursor to a different cell and then return back?
I have checkboxes (from the control toolbox) in a spreadsheet next to text. When I am in the normal view everything is where it is supposed to be. But when I do a print preview the checkbox shifts and comes on top of the text that was at the left of the checkbox.
This form has to be presentable both on paper and electronically. So both views are important.
I have an Excel file that use an internal link from one worksheet to the next. When I click on the link, I'd like it to go directly to a print preview page so I can print that one page instead just switching to the other worksheet. Is this possible?
I have a print userform where I let the user print a summary package of sheets. I am trying to allow the user to see a print preview of certain sheets. The first one is always the "Bid Summary" sheet (sheet 2). The rest are a dynamic number of sheets with numeric names starting at 1. Now I need a easy way for me to allow the user to see a print preview of the Bid Summary, and then all the sheets right afterwards. I cant use sheets("1","2",...).select because it wont select a ever changing number of sheets. Really it is a problem of selecting a varied number of sheets in VB.
First I made some contents and drew a border from Home > Font > all Borders on an Excel 2010 file. So it became like below image (capture1). After that I wanted to print it so went to File > Print to see its preview. But the problem is that the lines between tue and wed and also between mon and tue are not shown neither in preview nor when printing. The height of row 7 until 17 is 24 (that is 32 pixel) but heights of the rest of the rows are normal (20 pixel).
I have place a camera-picture of a table on the right side of a chart. On the screen it looks great! (See below - with some redaction)
.... but when I print it the table expands off of the side of the chart. Scale is 100%, zoom is 100%, Excel 2010 (See below - with some redaction). Whether or not I have a print area does not seem to make a different in the problem. Also, it appears that this happens with any shape I put in that place, it's not specific to the camera tool.
I have added three lines above the existing data, and now the print preview doesn't work. Where the range is names as X18 I have added to bump everything down. I get an error in the SetActiveSheet.VPageBreak..... line. I'm sure the issue is with the range, but I'm just not sure what the issue is.
Here's the code:
ActiveWindow.View = xlPageBreakPreview Dim i As Integer With ActiveSheet.PageSetup .PrintTitleRows = "" .PrintTitleColumns = "$A:$Z"
I have a spreadsheet and I would like for it to automatically close after printing.
Long version: The sheet is set up with several fields that can be changed by the user, and the date/time are automatically entered upon opening the sheet. I want to ensure that all fields are reset, and the date/time are correctly updated, every time that the user uses the spreadsheet. The last thing the user will do when finished entering his information will be to print the form, so I figure this would be a good time to make the form close (if this is possible).
I have already entered a code to prevent the query "do you want to save changes" before closing. So when they open the spreadsheet it will always contain the same starting information.