Creating a custom table...

A couple of issues regarding table creation. I want to insert a set of tables 
in a document header, but so they appear in the middle (vertically) of the 
page concerned. I want them in the header so the user cannot inadvertantly 
modify the table contents directly without actively entering into the header:

1. I have a dialog where a user can specify the number of rows that must be 
in a table. For example if they enter 4 then the table must be created and 
inserted with 4 rows and 2 columns. There are always 2 columns - how do I 
achieve the table creation and insertion at a specific place (perhaps 
coordinate) in a document?

2. The user may then decide that any of the rows must be removed, for 
example row 2, which means the contents of rows 3 and 4 must be shifted up. 
The problem here is that each rown contains a data field, which means the 
fields in row2,col1 and row2, col2 must now be replaced by those from 
row3,col1 and row3,col3 and so on. Any suggestions?

3. Finally, there are three tables that need to be inserted, one beneath the 
other - each containing different data fields. There may be some situations 
where table 2 never exists (not needed), but then the user may at a later 
time decide it is needed. Any neat ways of dealing with this?

thanks
Robin
0
Utf
3/11/2010 8:01:01 PM
word.vba.general 1023 articles. 1 followers. Follow

1 Replies
1150 Views

Similar Articles

[PageSpeed] 21

I would start with a template that already contained the tables in the 
position that you wanted them and then use code to add the necessary number 
of rows so that the total rows match the number input by the user.

For the second part of your problem, just use code to delete row 2.  Rows 3 
and 4 will then automatically become rows 2 and 3

For 3, add the necessary rows to table 1 and then split the table at the 
first of the new rows.

-- 
Hope this helps.

Please reply to the newsgroup unless you wish to avail yourself of my
services on a paid consulting basis.

Doug Robbins - Word MVP, originally posted via msnews.microsoft.com

"Robin" <Robin@discussions.microsoft.com> wrote in message 
news:24BF398D-1C1E-4710-B30A-2F090B380D4C@microsoft.com...
> A couple of issues regarding table creation. I want to insert a set of 
> tables
> in a document header, but so they appear in the middle (vertically) of the
> page concerned. I want them in the header so the user cannot inadvertantly
> modify the table contents directly without actively entering into the 
> header:
>
> 1. I have a dialog where a user can specify the number of rows that must 
> be
> in a table. For example if they enter 4 then the table must be created and
> inserted with 4 rows and 2 columns. There are always 2 columns - how do I
> achieve the table creation and insertion at a specific place (perhaps
> coordinate) in a document?
>
> 2. The user may then decide that any of the rows must be removed, for
> example row 2, which means the contents of rows 3 and 4 must be shifted 
> up.
> The problem here is that each rown contains a data field, which means the
> fields in row2,col1 and row2, col2 must now be replaced by those from
> row3,col1 and row3,col3 and so on. Any suggestions?
>
> 3. Finally, there are three tables that need to be inserted, one beneath 
> the
> other - each containing different data fields. There may be some 
> situations
> where table 2 never exists (not needed), but then the user may at a later
> time decide it is needed. Any neat ways of dealing with this?
>
> thanks
> Robin 

0
Doug
3/11/2010 8:58:15 PM
Reply:

Similar Artilces:

Creating PivotTable in Excel2007
How do you create a Pivot Table in Compatibility Mode in Excel 2007. The PivotTable need to be refreshed in Excel 2003. ...

Customization: disabling built in features
I would like to disable/remove some of the sections on the left hand side of CRM. For example, on the home screen I would like to remove the Invoices section since we don't use these. And on the Account level I would like to remove the Notes and Contracts sections for the same reason. Is this possible? Keith ...

SBS Exchange 2003: Create new user in AD but no exchange mailbox #3
I'm using SBS 2003. Exchange server is SP2. When I create a new user using Active Directory, it prompts me about creating a mail box. It says it's creating a mailbox, then it's done. But no mailbox appears. In fact, if I use the Exchange tasks wizard, I can create, delete, and recreate the mailbox--all say successful without an error message. And yet, no mailbox. This is even after I reboot the PC and sent email to the address. Any ideas what's going on? mike.aes@gmail.com wrote: > I'm using SBS 2003. Exchange server is SP2. > > When I create a new user ...

Multi Table Queries
At my job, I use enter data through generated queries. However it appears that I can only ENTER data in a query when it is based on two tables. If it is three or more, it doesn't let me enter any info. Is this normal? Am I doing something wrong? -Pete Pete wrote: >At my job, I use enter data through generated queries. However it appears >that I can only ENTER data in a query when it is based on two tables. If it >is three or more, it doesn't let me enter any info. > >Is this normal? Am I doing something wrong? Yes, that's common. You should only edit data ...

Prevent new pivot table items from being selected
I have a pivot table that contains accounts and reports sales by account. Users selected the accounts they want to see and save their spreadsheet. When new accounts are added to the accounts list, users do not want to see the new accounts. They only want to see the accounts they selected from a previous session when they refresh the pivot table. Does anyone know how to prevent the new accounts from appearing in the pivot table? Thanks! Tom, Use another column: Include, with values of Yes or No, and include it in your pivot table, showing only Yes. Then when new data is added, enter ...

Unique records in Pivot Tables
Excel 2000 I have data that stores Client Invitation to Tender and Supplier Contract details. Each Client ITT is uniquely identified. However we send out the same ITT to many suppliers so each request for service is given the same identifier, eg Reference Client/Supplier Contract Name Value Status AC/001 Client blah 4,000 pend AC/002 Client blah2 5,000 pend AS/001 Supplier blah3 3,000 pend AS/001 Supplier blah3 3,000 pend When I create my table by Client to get the total value pending ...

Employee Master Table error after V10 SP3
i have updated V10 to SP3, from SP1, and all seems to be fine except if I try to access the employee master table. Either from cards>payroll>Employee, or payroll transaction entry. Anytime I need to do a lookup on an employee id. Here is the message: A Get Change operation on table UPR_MSTR failed accessing SQL Data If I go to the more information or details button: [Microsoft][SQL Native Client][SQLServer] Invalid column name 'EMPLSUFF' [Microsoft][SQL Native Client][SQLServer] Invalid column name 'Dex_Row_TS' -- Doug It looks like an upgrade script failed...

Pivot table novice
As a teacher we tried a new data analysis tool this year in my school which worked really well... except for the fact that it meant manually filling in a table. I'm sure there must be a more efficient electronic way of doing it, but I'm not really an expert on these things. I want to be able to put in a list of data: pupils names with scores from two consecutive tests. Then I want to produce a table with test 1 and test 2 as the headers, and pupils' initials appearing in the relevant box. I have managed to create a Pivot Table to show what I want, except of course, it total...

How do you replace old data with new data without creating a new .
I have existing pivot tables and I want to replace the data source worksheet with new data and the pivot tables update with the new information. I have replace the data source but the pivot tables didn't update. Hit the "Refresh Data" in the pivot table toolbar (looks like an exclamation point) -- Regards, Dave "Dena" wrote: > I have existing pivot tables and I want to replace the data source worksheet > with new data and the pivot tables update with the new information. I have > replace the data source but the pivot tables didn't update. So...

Could Microsoft create a MSPOS user manual?
My customers are asking for one. Guess we were spoiled by RMS Store Operations having one available after Microsoft updated the SMS Commerce manuals. Makes me expect one for MSPOS even though most software no longer has printed manuals. -- Jeff Faul Merchants Solutions ---------------- This post is a suggestion for Microsoft, and Microsoft responds to the suggestions with the most votes. To vote for this suggestion, click the "I Agree" button in the message pane. If you do not see the button, follow this link to open the suggestion in the Microsoft Web-based Newsreader and t...

Viewing xml created in .Net in a ASP form VB6
I have been trying to create an xml document in VB.Net for displaying on an existing page written in ASP. im having a type mismatch error in my code. When i view my XML i have the following included in the <binary> node. <Binary xmlns:dt="urn:schemas-microsoft-com:datatypes" dt:dt="bin.base64">DATA HERE </Binary My issue is how do i set the datatype of the the node using dotnet so that i can replicate the same node structure and use my existing ASP page. thanks in advance Colin Graham ...

Help to build a table
Please help me to build a table similar to this one The number on the first column will change after 16 times, it will go in sequence from 1001, 1002, etc… The number in the second column will change after 4 times and it will go from 1 to 4 The number in the 3rd column will go from 1 to 4 2nd and 3rd column will keep the same pattern. Cabinet Shelf Location 1001 1 1 1001 1 2 1001 1 3 1001 1 4 1001 2 1 1001 2 2 1001 2 3 1001 2 4 1001 3 1 1001 3 2 1001 3 3 1001 3 4 1001 4 1 1001 4 2 1001 4 3 1001 4 4 1002 1 1 1002 1 2 1002 1 3 1002 1 4 1002 2 1 1002 2 2 1002 2...

Creating a form or template
We scanned in an image of a post it note that has graphics on it. It is a jpg file. Can we somehow make this jpg file a form or template in Outlook? Ideally, we want to pull up a form that looks like the image of a post it note with the graphics in tact and be able to compose a message on the email post it note. How do you accomplish this? Thanks! ...

Filtering data by custom fields in pivot tables from Visual Report
I have recently upgraded to MS Project 2007 and like the visual reporting feature, except I really need to filter and group the resulting pivot table in Excel by custom fields. For example, for task usage, I cannot filter my pivot table to show only the tasks that have costs > $0, thus my table ends up showing too many lines and a lot of 0's. I would also like to group by department/ function which I put in a custom text field. How do I do this? I saw related posts about saving the file as an Access database and then creating the pivot table by connecting to the datab...

Keeping Custom Properties When Forwarding or Replying to a Message #2
We have emails saved on the file system, that is kept track of by another program. These emails have custom properties attached to them. There is no custom form, just custom properties. These fields were originally added using objPost.UserProperties.Add. We need it so that when someone opens up one of these emails through the file system, and then replies or fowards the message, these custom properties are kept in the reply. This is so the external program can track these emails. Is there a way this can be done? We could have these emails opened up using an Outlook command line that i...

Combining Pivot Tables
Hi All, I have a data set of around 100,000 rows which I have imported into excel in two sheets (~50,000 rows each). The data is not in a format that excel can easily parse into a pivot table directly from the source - it requires some formulae in excel to be able to use a pivot table. I have used a pivot table on each of those sheets to summarise the data, and that works fine. However, I would like to be able to get a single summary pivot table from the two sheets (or from the two pivot tables). Is that possible, and if so, how do I go about it? Thanks, Alan. "Alan" <...

Unhandled database exception: A get/change operation on table 'Bat
During Edit Checks, we get the following message: Unhandled database exception: A get/change operation on table 'Batch_Headers' could not find a record. Then we get this message: This transaction was recovered during normal processing. You may continue processing this transaction. Any suggestions? You might want to run Check Links on payables. Before doing this, make sure you have a backup of your dynamics and company databases. Brenner -- www.KlenzmanConsulting.com "GPI" wrote: > During Edit Checks, we get the following message: > > Unhandled databas...

Grand Substraction instead of Grand Total in pivot table
Hello, I created a pivot table in Excel with Visual Report 2007. I'm using an Outline Code with 2 leaves : Receipts and Expenses. The pivot table created automatically a Grand Total so that $1000 Receipts and $800 Expenses => Grand Total = $1800. My accountant says $200. Generally, it's possible to create calculated fields in the Excel pivot tables. But in the pivot table created by the Visual Reprot, all the Calculated Field options are greyed out. Why ? Thanks for any help I don't know what visual report is, but suspect that it would be more a question for them not Excel a...

How do you define a custom paper size in Excel? (i.e. 11x17)
How do you define a custom paper size in Excel? (i.e. 11x17) Hello- Excel doesn't provide for custom paper sizes, but most any size appropriate for Excel output is already provided _if_ the installed print driver supports it. Go to File>Page SetUp--Page and open the list of sizes. If your installed driver supports 11x17 it will be in the list (although it may be listed as 'Ledger' rather than by dimensions). HTH |:>) "Marcin Rembisz" wrote: > How do you define a custom paper size in Excel? (i.e. 11x17) ...

Insufficient Permissions to Create Tasks
Hi, Exchange 5.5, Windows 2000, Outlook 2000. I have a user who is trying to create tasks and he gets a message that says that he does not have permission to do this. He can edit tasks and delete tasks, but not create them. We've run the repair utility, reinstalled, thought that it had to do with the PALM software and removed that, and there has been no change. Any help would be much appreciated! Thanks! ...

Customized Task Views Have Disappeared (Take 2)
I was having an issue similar to this original post and followed the instructions given. It worked, but as I have worked with it I have found that it will restore my customized Task views but not my customized Contact views. I can change some of the Send and Receive setting and it will restore the Contact views but not Task views. Somehow I am searching for a way to restore both Task and Contact views. Any ideas? -- Tia, Education and Documentation Specialist Sorry, i posted this in the wrong discussion group. I have posted this correctly and my question has been answered. -- ...

Fonts do not print in colur used when document created.
When I create a document in either Word ot Publisher the text is not always printed in the colour selected. This problem seems particular to Red & Blue. can any one help please. Peeter Have you tried some maintenance on your printer? Are you saving as a PDF? This problem has been reported using Microsoft's save as add-in. -- Mary Sauer http://msauer.mvps.org/ "Peter Piper" <PeterPiper@discussions.microsoft.com> wrote in message news:76737C66-2B07-42DF-BFC5-828A14CE135F@microsoft.com... > When I create a document in either Word ot Publisher t...

Creat new dictionery
It says when I try to add a new word to my dictionery that it is full. How do I expand same, or create a new dictionery? I use WORD 2003 See http://sbarnhill.mvps.org/WordFAQs/MasterSpellCheck.htm -- Suzanne S. Barnhill Microsoft MVP (Word) Words into Type Fairhope, Alabama USA http://word.mvps.org "kernaghanl" <kernaghanl@discussions.microsoft.com> wrote in message news:BBC3C828-16EF-4861-B3A5-2A7CC406F43C@microsoft.com... > It says when I try to add a new word to my dictionery that it is full. > How > do I expand same, or create a new dictione...

Choosing FROM when creating an e-mail
I have several e-mail accounts. When creating a new e- mail message sometimes I like the option of choosing a different e-mail account the new e-mail is 'from' rather than the default account. This function is possible in Outlook Express via a drop down list in the 'FROM' field when creating an e-mail, but Outlook doesn't even have a 'FROM' field and uses the default e-mail address as the return address. Please advise if this is possible in Outlook. Thanks. (PS I'm using Outlook 2000) Outlook 2000 Corporate or Workgroup mode (check Help->About) doe...

Creating Custom Dialog Boxex (Popup)
Hello, I am trying to create a custom dialog box that will allow me to have the user clarify an entry when a checkbox is checked. I want them to be able to select something from a list that I have created. I have created the popup in Excel but cannot find out how to call the popup into the display when the checkbox is checked. Can anyone help me please? Is this a checkbox on the worksheet? If yes, then if it's a checkbox from the Forms toolbar, assign this macro to the checkbox: Option Explicit Sub testme() Dim myCBX As CheckBox Set myCBX = ActiveSheet.CheckBoxes(Appli...