Posts by test123ja

    Re: Help with if or loop

    Hi Ctop

    Thank you for the quick answer. I'm sorry for my bad explanation.

    For example, if A3 = 2, the current code:

    • Searches for '<<OPTIONEEL2>> in a existing Microsoft Word document and replace it with data in Cell C4
    • In this existing Word document the only text in there are:


    What is want is when in cell A3 is a 2 then show only the value from cell C5 the other two texts : <<OPTIONEEL1>> and <<OPTIONEEL3>> have to be deleted or hidden

    Re: Help with if or loop

    Hi Cytop

    I will explain hopefully well

    In my Excelfile i have one cell. In this cell i can give values from 1 till 3. Every number is linked with a text in Word. What now happens is that, when i select number 2 in excel, al the three texts are shown in Word.

    But what i want is that the text that is linked with number 2 and remove the other texts.

    I hope i

    The code is:

    Hi guys ik hope you can help me i am new to VBA. I searched the internet for how to do if .. then otherwise if...

    But i can't find the right way to do

    What is want is: When cell A3 = 2 then find <<>> in word and paste text. But when A3 is 1 or three i want vba to paste another text in another cell.

    i hope you can help me with it.

    My is: