Excel CheckBox Into Word Paragraph.

AxelD

New Member
Joined
May 12, 2016
Messages
2
Hi all,

I've recently generated an excel table for my company, showing every kind of assessment we do (followed by an ActiveX checkbox).
The initial aim was to select any boxes you want, and generate a price at the end.

Easy.
Private Sub CheckBox6_Click()
temp = "23"
temp2 = "H23"
If (CheckBox6 = True) Then
Range(temp2) = Range("_C1_").Value
Else: Range(temp2) = 0
End If
End Sub
Now what I want to do is to attach a Word paragraph (describing the task) to every box, so that whenever you are done checking your boxes it generates, on a pre-template Word document, all the paragraphes (using macros).

This in order to fast generate Sales Quote of course.

Here is an image (with fake Assessments of course).
View image: excel


Thanks a lot for the answers, I will keep it updated and send the final macro if needed.

AxelD
 

Some videos you may like

Excel Facts

Bring active cell back into view
Start at A1 and select to A9999 while writing a formula, you can't see A1 anymore. Press Ctrl+Backspace to bring active cell into view.

AxelD

New Member
Joined
May 12, 2016
Messages
2
I finally got the answer.
I put this formula for every checkbox, linking it to another spreadsheet ("Feuil1"), opening a word and pasting the text inside.

Private Sub Grizzly_Bear_Click()
temp = "21"
temp2 = "H21"
If (Grizzly_Bear = True) Then
Range(temp2) = Range("_A3_").Value
Else: Range(temp2) = 0
End If
End Sub


Followed by:

Private Sub CommandButton1_Click()
Dim wDoc As Word.Document
Set wApp = CreateObject("word.application")
wApp.Visible = True
Set wDoc = wApp.Documents.Add


If (Yield_Review = True) Then wDoc.Content.InsertAfter Sheets("Feuil1").Range("C8")
End If

End Sub



Now my big deal is the following:

In total I have 3 spreadsheets quit similare, and a 4th one with data text boxes.
The two first checkboxes "Bunny Rabbits" and "Unicorns" are depending on my two other first spreadshets (called "Bunny Rabbits" and "Unicorn" as well).

The thing is, I cannot figure out how to use my previous results inside a new spreadsheet, depending on the "True/False" checkbox.
If If put the same macro but in the 3rd sheet, Excel will just pass over it without looking it.

Help ?
 

Watch MrExcel Video

Forum statistics

Threads
1,109,258
Messages
5,527,660
Members
409,781
Latest member
Maxcwy2020

This Week's Hot Topics

Top