Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Reference table cells: Using a table instead of an VBA form...

Status
Not open for further replies.

GrodanBoll

Programmer
Mar 6, 2002
45
0
0
ZA
Hi

I'd like to replace the popupform I currently are using in my word templates with an invisable (at print) table instead.

Is it possible to use a certain cells value to reference in other parts of an document (for example headings, header, footer)?

If so, can you give me a push in the right direction? =]

Thanks
Grodan
 
Please spec this out better.

You want an invisible table at Print time?

We have no idea what your popup form looks like, or does.

Is it possible to have a cell value
reference in other parts of an document (for example headings, header, footer)[/quote

Yes, absolutely, but you have to spec this out better.

Please post EXACTLY what you want to happen. Do you know how to use bookmarks? Do you know how to get at header/footer contents programatically?

Gerry
 
Ah, sry for the bad spec. it looked clear in my head. ;)

Today I have built up some templates with VBA and userforms.
But I don't really have the time to update and create new ones for my work.
So, I was thinking of some new way of creating simple templates that are easy and fast to create.

I came up with the idea of instead of using userforms I could have a table in the template that are hidden för print and preview. In this table the user would input for example the date and the subject.

[tt]
___________________________________
| | |
| Date: | 2005-03-17 |
|________________|___________________|
| | |
| Subject: | Regarding... |
|________________|___________________|
| | |
| Project no: | 2/7106 |
|________________|___________________|
[/tt]

The values from the specific table cell (in column B in the example above) should then spread them selfes in the whole document (for example in the headings) via field REF.

The problem I have is how to access the cells vaule via the field REF.
I have tried to put the whole cell in a bookmark, but then a whole table (with one cell and one column) will be inserted istead of only the value in the cell.
I have also tried to put the whole table in a bookmark and tried to access the specifik cell via { REF (tableName columnXrowY) } but it doesent work.
And at last I have tried to put in form objects but then it locks the entire document.

I could use the field ASK option to make the user enter the values in the bookmarks in the hidden table. But then the problems comes when the user like to cahnge som value -> the bookmark will be deleted.


I hope this better explains what I'd like to do. =]

 
1. You do NOT have to lock the entire document when using formfields. You can use Continuous Sections breaks to separate locked and unlocked sections.

2. You DO have to have the entire TABLE within a protected section for formfields in tablers to work. You can not put a continuous sections break within a table.

Try using formfields again.
Give the formfield a nice explicit name - do not accept the default names Word assigns.

Mae SURE you have Calculate on exit checked.

Where ever you want that value, press Ctrl-F9 and type in the formfield name. When the user exits that formfield, the other field will update with the formfield value. you can make as many of these as you like, where ever you like.

Gerry
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top