Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 11-06-2013, 11:55 AM
C J Squibb C J Squibb is offline Add multiple rows to Excel 2010 table at cursor position Windows 7 64bit Add multiple rows to Excel 2010 table at cursor position Office 2010 32bit
Novice
Add multiple rows to Excel 2010 table at cursor position
 
Join Date: Aug 2013
Location: Essex
Posts: 14
C J Squibb is on a distinguished road
Default

Hello MikeC and Bob and thanks again for your input.
Bob, I followed your advice and have tried it with the "Include new rows and columns in table" both checked and unchecked, but continue to see the same problem: no code is executed after the initial row is inserted.

My plan was to have the table sorted in date order, but with some forthcoming payments entered; I therefore wanted the user to place the cursor on the first FUTURE date and insert a row (or multiple rows determined by an input box) at the cursor position.



MikeC, when I say the code stops, it just stops executing. I can be in the middle of a loop, stepping through with the yellow bar, but when I get to the command that enters a new row, the yellow bar goes off and all further lines of code are simply not executed. If I continue to press F8, I get a yellow highlight at the start of the Sub again. If I run the code without stepping through, one line is entered if I use Range(myTable).ListBbject.ListRows.Add, and n rows are added if I use Selection.EntireRow.Insert, but no actions beyond that point occur - not even a simple message box.

I'm working on diminishing returns here - as has been mentioned, I could get the user to add the data to the bottom of the table, then sort it into date order. I'll try one last thing - copying the module and table into a new workbook. If that doesn't work, I might strip it down to a sample file and post it up here, but I don't really want to waste any more of your time.
Reply With Quote
  #2  
Old 11-06-2013, 12:33 PM
BobBridges's Avatar
BobBridges BobBridges is offline Add multiple rows to Excel 2010 table at cursor position Windows 7 64bit Add multiple rows to Excel 2010 table at cursor position Office 2010 32bit
Expert
 
Join Date: May 2013
Location: USA
Posts: 700
BobBridges has a spectacular aura aboutBobBridges has a spectacular aura about
Default

There's a scene in NCIS where a skilled hacker is playing in one of Abbey's computers, and she's frantically trying to shut him out. She and McGee are shouting advice at each other, but neither knows what to do because the Bad Guy seems to be better than both of them and he's getting at their databases. What will they do? They seem to be helpless—

—and then the screen goes black, and their hopelessly untechnical boss stands up, brandishing the now-disconnected PC's power plug.

Along those lines, is it worth suggesting that you abandon tables and have your VBA program work with ... well, just cells? At least until you figure out (or Microsoft fixes) this problem.
Reply With Quote
Reply



Similar Threads
Thread Thread Starter Forum Replies Last Post
Formula that can merge multiple rows with the same ID into one row Hilwey Excel 3 07-08-2015 08:50 PM
Add multiple rows to Excel 2010 table at cursor position Word 2010 and Excel 2010 Mail merge - multiple headers robby Word 3 04-18-2012 06:37 PM
Displaying cursor position within cell MiamiTom Excel 0 11-18-2011 09:02 AM
Add multiple rows to Excel 2010 table at cursor position Setting cursor after last Table of Contents DugganSC Word 1 09-07-2011 11:42 AM
Retrieve position of Cursor - x & y positions SDondeti PowerPoint 0 05-19-2011 11:39 AM

Other Forums: Access Forums

All times are GMT -7. The time now is 10:04 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft