VBA: Insert Page Breaks code is not working in Excel 2010

I have a snippet of VBA code to insert page breaks after a particular row.
This works fine in Excel 2007, but it doesn't in another Excel 2010 machine.
It doesn't seem right to me that VBA code would behave differently in
different versions of Excel. Am I missing something??

1
iswarya
4/22/2010 9:18:38 AM
excel.programming 6508 articles. 1 followers. Follow

1 Replies
2209 Views

Similar Articles

[PageSpeed] 46

RE: Am I missing something??

Yes, your code.



-- 
Regards
Dave Hawley
www.ozgrid.com
"iswarya" <u59539@uwe> wrote in message news:a6e77011b51d5@uwe...
>I have a snippet of VBA code to insert page breaks after a particular row.
> This works fine in Excel 2007, but it doesn't in another Excel 2010 
> machine.
> It doesn't seem right to me that VBA code would behave differently in
> different versions of Excel. Am I missing something??
> 

0
ozgrid
4/22/2010 9:24:43 AM
Reply:

Similar Artilces:

inserting a picture
hi I need your expertise regarding inserting a picture in word 2007. When I hit the office button and go to open then my pictures, pick the picture i want and then click open. After that it brings up the convert file dialogue box and i cant bring up the picture. Can you help me with this problem? Thank you , Joe. Hi, I am not that sure why that problem is happening but i believe that it is having problem importing pictures that are in another format. I want to know a few things: Where did you get the picture? What is its file extension? Make sure that your pictu...

Stopping word split lines over pages
Hi All, I wonder whether you knowledgeable folk can help me... I'm really stuck with this one and it's driving me slightly crazy. I'm re-typing/ editing a theatre script in word. It's formatted so that the Character's name who is speaking is on one line and then directly below is there dialogue. There is then 2 line breaks before the next section of dialogue... E.g: SAM Hello There how are you? JOHN I'm fine thanks... How was your day? SAM Good... (etc. etc.) What I want to stop work from doing is splitting the Character's name and the li...

Sort several workbooks using code
I am looking to run code that will sort several workbooks even when they are closed. The code would be executed via a master workbook which will also be sorted. Is this possible? I'm not aware of sorting records in a CLOSED workbook, but what you can do is this. Create some button on the master workbook and let it open the other workbook, sort the other workbook and close the other workbook. Accompanied with Application.ScreenUpdating (but also depending on the amount of records) you will hardly notice the sorting actions. Does this help ? -- Regards; Mark ...

A Newbie question. Input value and have return inserted in Word
I have a listing of numbers with names/addresses in Excel and would like to be able to enter a number and have the corresponding info returned into a Word merge file. Is this possible? Any help would be greatly appreciated. Tks ------------------------------------------------ ~~ Message posted from http://www.ExcelTip.com/ ~~ View and post usenet messages directly from http://www.ExcelForum.com/ ...

outlook 2010 sync issues
I am trying the technical preview of outlook 2010. I installed outlook connector to outlook 2010 to use my hotmail account. however, Whenever I command a "send and receive" sync log messages arrive to the syn issues folder. Everyday I get about 50 messages like that. What could be the problem? I don't use exchange or anything like that.... "minimus" <minimus@live.co.uk> wrote in message news:h6dlh5$do0$1@news.eternal-september.org... > I am trying the technical preview of outlook 2010. > > I installed outlook connector to outlook 2010 to use my...

is there a way to insert week numbers in the Outlook Calendar?
I need an easy way to control contracts and week numbers are basic for one of my subcontractors. Can anyone help? Thank you! You can display them on the navigation calendar and month view, but if you need them on physically on the calendar, you'll need to create events. See http://outlooktips.net/apptseries for the method. -- Diane Poremsky [MVP - Outlook] Outlook Tips: http://www.outlook-tips.net/ Outlook & Exchange Solutions Center: http://www.slipstick.com/ Outlook Tips by email: mailto:dailytips-subscribe-request@lists.outlooktips.net EMO - a weekly newslet...

Excel as a Database
Hi, I m using invoice in excel. Is there any way to store record of last sales as a database? I want do it in only in excel. Give me complete process. RRS Hi Rao Try this http://www.rondebruin.nl/copy1.htm -- Regards Ron de Bruin http://www.rondebruin.nl "Rao Ratan Singh" <RaoRatanSingh@discussions.microsoft.com> wrote in message news:36DBC96E-24F5-45F1-8B16-FFCAC322D846@microsoft.com... > Hi, > I m using invoice in excel. Is there any way to store record of last sales > as a database? > I want do it in only in excel. Give me complete process. > > R...

How to write XML to the rendered HTML page.
In code behind, I generate a string that I would like to have rendered to my page so that my javascript can load it into a client side javascript xml document. If I use repsonse.write(txml), it puts it outside of the body of the document. I also tried assigning it to a label.text, but the javascript can not find it inside the span tag. Is there a way to do it? Thanks in advance. txml = "<xml ID='oPriceBookDrops'>" txml = txml & "<PBInfo>" txml = txml & "<DataPoint>" txml = txml & "<Product ProductName='Scre...

How to Stop Worksheet_Change event from running during code execution
I'm sorry If I've asked this before but I can't find an answer to it. I have the following 2 events in a worksheet module.... Private Sub Worksheet_Change(ByVal Target As Excel.Range) Private Sub Worksheet_SelectionChange(ByVal Target As Range) I run some codes, either in UserForms or general procedures that make changes to this worksheet. Q. Is there a way to by-pass those two events somehow? As an example I have a uf that comes up if a cell is selected in that sheet. So I need those worksheet_Change events to work at that point. But then, the uf does some stuff like inputing ...

VBA code to say Yes or No if any VBA code is present in ActiveWork
Using XL 2003 & 97 Would like hit Ctrl+Shift+V and have an answer either yes or no as to the presence of Any VBA code in the Active Workbook. I do know that about the VBA editor/Explorer or to press the Run Macro button and get a list from various sources . I would like to stay at the keyboard and process a series of macros including one to let me know if I even need to evoke the VBA explorer. TIA Dennis There is no bootstrap macro to tell you whether you have macros or not. If there were there would be no limit to virus writers. --- HTH, David McRitchie, Microsoft MVP - Excel ...

Graphics Insert into Publisher Doc.
When ever I insert a graphic into my publisher docs. they appear as a series of dashes around the perimeter of the graphic & across the diagonals of the graphic not the actual graphic I am trying to work with. Can anyone advise of a fix as this is driving me insane. Regards, Longa Do you have detailed display enabled? View, pictures, detailed display... Otherwise you may need to update your graphics/video driver. Slide the acceleration down on your adapter, control panel, display folder, settings tab, advanced button, troubleshoot tab. If your images appear, then go to the manufacturer...

Favorite Reports on Home Page
Is there a way to display one or more of my favorite reports on the home page? In microsoft.public.money, Kane wrote: >Is there a way to display one or more of my favorite reports on the home page? No. The choices you can choose from on the "home" page are fixed. ...

Payout reason codes
Can someone point me to where in the database the payout reason codes are stored? thanks, Store Ops Manager, Database, Reason Codes, Type = Payout "Jason" wrote: > Can someone point me to where in the database the payout reason codes are > stored? > > thanks, Thanks. What I meant (and asked poorly) was if I wanted to design a custom report to show that info where would I need to look? Thanks, "Wendy_I" wrote: > Store Ops Manager, Database, Reason Codes, Type = Payout > > > > "Jason" wrote: > > > Can someo...

Excel separator pages
When printing multiple copies of a spreadsheet if it is set to collate I get multiple separator pages 1 for each copy, if I turn off the collate option, I only get 1 separator page. Can this be adjusted in any way so I don't get multiple separator pages even when I use the default collate option?? ...

Visual Basic Runtime Error when closing Excel
Sometimes (not always) when I exit Excel after a long workday I get a Visual Basic Run-time error 5 "invalid procedure call or argument". Can I get rid of this error by uninstalling/reinstalling Excel or is there something serious going on? I am using Excel from an Office 2000 package and I seem to not have any other troubles. We work on a Win 2000 Small business server environment. Any help here would be greatly appreciated. Thank You Sounds like a normal Excel glitch of the sort we all know and love. Poor Excel does seem to get tired after a time and plays up a bit to relie...

Chip Pearson- you're web page is down
I am getting a 404 error on Cpearson.com cpearson.com/excel.html works though The page loads fine for me. -- Cordially, Chip Pearson Microsoft MVP - Excel Pearson Software Consulting, LLC www.cpearson.com "scott" <scott@mail.mail.com> wrote in message news:u8pAPpLBFHA.1564@TK2MSFTNGP09.phx.gbl... >I am getting a 404 error on Cpearson.com > cpearson.com/excel.html works though > works fine for me too -- Rob van Gelder - http://www.vangelder.co.nz/excel "Chip Pearson" <chip@cpearson.com> wrote in message news:%23YvgfrLBFHA.3492@TK2MSFTNGP...

Print, Merged Cells, and VBA
Hello I'm looking for a code that will help me with a print job for a worksheet. There are a lot of merged cells and a lot of "IF"s to be used in the VBA for range selection. Thanks in advance, Sarr ...

Hyperlinks that I recieve in e-mails don't work in outlook 2003
LMT <LMT@discussions.microsoft.com> wrote: <nothing> Ask your question in the body of the message, not the subject. If you're using Internet Explorer, try this: click Tools>Internet Options>Programs>Reset Web Settings -- Brian Tillman "Brian Tillman" wrote Thanks Brian worked great. LMT > LMT <LMT@discussions.microsoft.com> wrote: > <nothing> > > Ask your question in the body of the message, not the subject. > > If you're using Internet Explorer, try this: click Tools>Internet > Options>...

Printing Doesnt fill entire page?
I used a default template for a tri-fold brochure. I create an object that contains a color for the backround of the entire file and size it to match the area of the project (8.5 x 11) However when I go to print it i get a white border around the entire outside. How do I get it so the color goes all the way to the edge of the page. Open WordPad, file, page setup, input zero in each of the margin boxes. WordPad defaults to your printer's margin limitation. This is why you are getting the white border... Your printer cannot print to the edge unless you have full bleed capabilities...

Use VBA to update Access table or Query from Excel
Can I use VBA to update Access table or Query from Excel? Thanks in advance Hi Leungkong, > Can I use VBA to update Access table or Query from Excel? Of course, using ADO or DAO. See: http://www.erlandsendata.no/english/index.php?d=envbadacexportado Regards, Jan Karel Pieterse Excel MVP http://www.jkp-ads.com Hi Jan, Thanks. I think ADO is what I want. But I am not only want to export from excel to access. I want to edit some data in access table. For example, Access has a table "ProductList" I want to use Excel to call the product by "Pro...

SQL Not Working
What is wrong with this SQL? I am trying to use a Median function and trying to have the median calculate for each JobCode. SELECT tEmployeeMasterCopy.JobCode, (SELECT Median("tEmployeeMasterCopy","HourlyRate") FROM tEmployeeMasterCopy as M1 WHERE M1.JobCode = tEmployeeMasterCopy.JobCode) AS MedianByJobCode FROM tEmployeeMasterCopy GROUP BY tEmployeeMasterCopy.JobCode; Thanks in advance. It seems that (SELECT Median("tEmployeeMasterCopy","HourlyRate") FROM tEmployeeMasterCopy as M1 WHERE M1.JobCode = tEmployeeMasterCopy.JobCode) ...

VBA and Scheduled task in Outlook
Hi, how can I: a) pull the query from somewhere and send it by e-mail automatically. E.g. I want to take a temperature table from http://www.wunderground.com/history/airport/EHAM/2009/7/10/DailyHistory.html?req_city=NA&req_state=NA&req_statename=NA where 2009/7/10 is the date of yesterday put it into an e-mail and send it automatically each day at 8 o'clock? b) if this is not possible, how can I send an e-mail with the attachment c:\Documents\query20090710.xls each day at 8 o'clock? my boss wants this automatized, I know how to write the VBA code for Excel, but don'...

VLOOKUP in VBA
On the worksheet I can insert in a cell =VLOOKUP(C5, Hobokee.xls!AcsLow, 2) and it works perfectly, looks up the value in column 2 of the range named AcsLow in the same workbook. But elswhere I want in a macro to lookup the same table and assign the result to a variable BalAmt. BalAmt = VLOOKUP(AccNum, Hobokee.xls!AcsLow, 2) does not work. It gives a function not defined error on Hobokee. If instead of Hobokee I put Workbooks("Hobokee"), it gives function not defined error for VLOOKUP which it changes to VLookup. I have been overVLOOKUP in the Help file and see nothing wrong. W...

Column width and pasting sections in excel? Formatting questions
I am trying to make a spreadsheet in which I need to have varied column widths in different sections, one under another. (they don't need to relate directly, and no major equations going on) for example: xxxxxxxxx|xxxxxxxxxx xxxxxxxxx|xxxxxxxxxx xxxxxxxxx|xxxxxxxxxx xxxxxxx|xxxxx|xxxxxx xxxxxxx|xxxxx|xxxxxx How do I go about splitting the sheet or whatever I need to do so I can manipulate columns differently based on the row I'm in? Thanks! Rich Column widths apply to the whole column. You may be able to use merged cells to give the appearance that you want, but I try to stay...

Inserting Rows
Hi, I have 500+ rows of data that I would like to insert a blank row in between each row. Is there a globabl way of doing it rather than having to click on each row one at a time and then selecting 'insert row'? Thanks Ben Hi Ben have a look at http://tinyurl.com/2pt5r Frank Ben wrote: > Hi, > > I have 500+ rows of data that I would like to insert a > blank row in between each row. Is there a globabl way of > doing it rather than having to click on each row one at a > time and then selecting 'insert row'? > > Thanks > > Ben Thanks...