erikgutten
06-11-2012, 03:09 PM
I work with creation of simple user imput forms for some templates
I manage to get most of my simple code to work fine, but now i am a bit stuck with these questions, apretiate tips and help very much.
1. Radiobutton
Option Explicit
Dim opttxt1 As String
Private Sub UserForm_Initialize()
If Opt1 = True Then opttxt1 = "editable text" 'to push text in textfield in the form at the same time as radiobutton is selected, when done editing, i push it to document bookmark
End sub
Should i chnge or add to:
Dim opttxt1 as integer, in leu of string function?
2. Checkboxes
Various checkboxes that i plan on to insert text from a wide range of docs,
place them in the "master doc", but without knowing how to get the text to be placed where i want, without loosin next bookmark..
Example:
Dim oRng As Word.Range
Dim oBM As Bookmarks
Set oBM = ActiveDocument.Bookmarks
Set oRng = oBM("sometitle").Range
oRng.Text = chk1.result' goto folder get text from doc, insert text
For as many as 50 or more predefined docs, in one specific folder, all with unike filenames (i controle that)
My purpose of this is to make it so that rather i do the job that i mean other can do, for documenting sold products, etc. -also for tendering bids...
any ideas?
I manage to get most of my simple code to work fine, but now i am a bit stuck with these questions, apretiate tips and help very much.
1. Radiobutton
Option Explicit
Dim opttxt1 As String
Private Sub UserForm_Initialize()
If Opt1 = True Then opttxt1 = "editable text" 'to push text in textfield in the form at the same time as radiobutton is selected, when done editing, i push it to document bookmark
End sub
Should i chnge or add to:
Dim opttxt1 as integer, in leu of string function?
2. Checkboxes
Various checkboxes that i plan on to insert text from a wide range of docs,
place them in the "master doc", but without knowing how to get the text to be placed where i want, without loosin next bookmark..
Example:
Dim oRng As Word.Range
Dim oBM As Bookmarks
Set oBM = ActiveDocument.Bookmarks
Set oRng = oBM("sometitle").Range
oRng.Text = chk1.result' goto folder get text from doc, insert text
For as many as 50 or more predefined docs, in one specific folder, all with unike filenames (i controle that)
My purpose of this is to make it so that rather i do the job that i mean other can do, for documenting sold products, etc. -also for tendering bids...
any ideas?