Here is the code I am using to enter text from a text box in a userform into a formfield in a word document.
Set product = ActiveDocument.FormFields("ProductName").Range
product.Text = userform.productname
This is great apart from the fact that it deletes the form field when entering the...
Ok so I have achieved almost want i require.
Please see attached file.
However I am having difficulty formatting some of the cells.
At the moment it is set so that the first row is merged across the six columns works perfect formfields are inserted into the correct cells.
however if I...
So I am trying to use code to create a table in word.
So far I have managed to insert a table of variable rows and columns depending on values of x,y. This table is placed into a specified bookmark and then the bookmark is replaced after the table so that another table if required can be...
I have a form that prompts the user to tick check boxes depending on the ticks different text boxes become visble allowing the user to input values.
In essence the text boxes are arranged into 6 colums and a maximum of 25 rows. Depending on the ticks rows of text boxes are hidden.
I want to...
currently i can addrees bookmarks in teh document from the userform. code used for this is
Dim orange as range
Set orange = ActiveDocument.bookmarks ("name of bookmark").range
so i guess i need to do the same for the option button or checkboxes
but what should it be...
I have a userform within word. With some option buttons i want the outcome of these option buttons to affect some checkboxes embeded in the word document itself.
Where do I position the code if I place the code within the useform it does not recognise the existance of the check boxes in the...
I want to be able to open one word document which has a userform set to show on open.
This userform enables the user to browse for the filename of a document. A command button confirms their choice and runs the next part of the code. (I can write the code up to here)
I am having problems...
At the moment I have a userform which loads on open.
Private Sub Document_Open()
UserForm1.Show
End Sub
the document is read only so when saved a copy will be made under a new filename.
I want to insert an if statement to the above to check if the file is the original or a copy so that a...
Thanks Mr B that was teh general direction I was heading in.
I have one more probolem regarding this form. Different than above.
The form is working perfectly loads on open executes required procedures and hides when confirm button is selected.
How do I make this form use once? The...
Thanks Holger
Kryst51 I dnt think I was clear in my description but I want to freeze column A and Z but not in between so the columns inbetween scroll as usual.
So basically I have a word document set up which on load display several message boxes one after the other depending on the answer YES or NO a bookmark is found within the document and deleted.
The purpose being the document is trimmed down and tailored for teh specific requirements...
Here is the code
Sub Show_packaging()
'To hide columns without 2 in specific row
Dim col As Range
With ThisWorkbook.Sheets("Engineering")
For Each col In .Range("E3:CW3").Columns
col.EntireColumn.Hidden = _
Application.Sum(col) < 2 or > 2
Next
End With
End Sub
however I get a compile...
:)Ok so I scraped the idea of having it linked to the original filter.
Instead I thought about having two command buttons in conjunction with the filter one to shrink and one to reset.
The idea being the shrink button would hide any column that does not have a value in it ie hide anything...
OK scrap my last post the soulution I require does not actualy require to be that dynamic.
As this is just a temporary medium for the data to be in the table will not get any bigger.
So I know exactly what collumns need to be hidden for each filter option.
Is there a way that I can use...
No problem atomic Shrimp
and yes to both you and chergh I understand that the simplest way to achieve it would be to set column width to equal zero.
But how to link this oporation to the existing filter??
and perhaps the bigger problem getting this to reset once the filter is removed or...
Hi Atomic Shrimp
Thanks for you reply I understand where you are coming from.
Basically just moved into a new job the current document was not designed by me and is temporary before I get the go ahead to port it all to a central data base need to wait for access rights ect
So i was more...