Posts by alring

    Re: Conditinal formatting according to text


    Hi Roy


    It seems that it's only working when I write text in Range (A1:A10). But I don't write text in these cells. I make a vlookup and the result from there is written in cella A1:A10. And when I do that then the color don't change.


    regards
    Alring

    Hi there


    I have been reading the code for conditinal formatting, so it's posible to have more than 3 rules (see below):



    This one is for numbers but I have text instead. I have different kind of text that I find with lookup. Now I want to color the cell according to the text that I find during the lookup.


    Regards
    Alring

    Re: Colour cell


    Hi Andy


    Thank you for your exsamble. Now i could see what I was doing wrong. I copied your formela and didn't change "," to ";".


    SORRY :gift:


    But anyway thank you for your reply. :thanx:


    Alring

    Re: Colour cell


    I have a macro that look like this:


    Sub colour_Click()


    If Range("A2") = "l" Then
    Range("B2").Select
    Selection.FormatConditions.Delete
    Selection.FormatConditions(1).Interior.ColorIndex = 3
    End If


    End Sub


    But it don't work.

    Re: Colour cell


    Hi Andy


    It seems that it doesn't work. I can only get it to work when I tehn also write "=Or($A$1="L",$A$1="S") " in cell B1. But B1 is empty.


    Alring

    Re: Colour cell


    Hi pangolin


    I can't get CONDITIONAL FORMATTING to work in another cell than the cell where I have written S or L.


    I can get CONDITIONAL FORMATTING to work in cell A1, but not in cell B1 because cell B1 is empty. But according to what is sritten in cell A1 then should B1 be coloured too.


    Alring

    Hi there


    If I in cell A1 have the letter S or L then I want that cell B1 change the background colour. Is that possible with VBA?


    Alring

    Re: Sheet name


    Hi pangolin


    Thank you for your reply. It is working perfect for me. :rock: But you probely already new that.


    :thanx:


    Alring

    Hi there


    I want to rename an Excel Sheet. I have the name in a cell. Is it possible to link the Sheet name to a cell?


    Alring

    Re: macro that open header


    Hi Andy


    Yes i did. But in a wrong way. With the last code change for you it works.


    Ones again. Thank you so mush for your help. What would I do without you?? I know: Be very lost. :rock:


    :thanx:


    Alring

    Re: macro that open header


    The only problem I have now is that the code paste the cells from Excel into the document that it's open and not to the document mensioned in cell ("C26").


    Alring

    Re: macro that open header


    Hi Andy


    I knew that I was doing something wrong. Because now it works as it should.


    I thank you so mush for your help.


    :thanx:


    Regards
    Alring

    Re: macro that open header


    Hi Andy


    There is something wrong here. Maybe it's me. The change for it is very BIG.


    When I run your code in Excel then I get the message "User-defined type not defined". I get that in the line with "Dim appWord As Word.Application"


    When I then delete the first 3 lines in your code then I get to the line with ".Headers(wdHeaderFooterPrimary).Range.Paste" and get a new message saying "The requested member of the collection does not exist".


    Am I doing something wrong?? Again here is the change very BIG.


    Alring

    Re: macro that open header


    Hi Andy


    Thank you for your reply. It seems that I can't use that. Meaning that I can't get it to work.


    The macro I have now look like this.
    [vba]Sub Button1_Click()
    Range("A1:D4").Select
    Selection.Copy
    intPrintJobs = Range("A24")
    aNameAndPath = Range("C26")
    Range("A7").Select
    Set appWD = CreateObject("Word.Application")
    appWD.Visible = True
    appWD.documents.Open Filename:=aNameAndPath
    appWD.Selection.Paste
    Application.CutCopyMode = False
    appWD.ActiveDocument.PrintOut , Copies:=intPrintJobs
    End Sub[/vba]


    ("A24") is the numbers of print I want.
    ("C26") is the document I want to open.


    Range ("A1:D4") is what i want to copy into the header of the Word document.
    I have tried what you said, but I get it to work. Maybe I write it wrong. maybe you can change my code so it works.


    Regards
    Mads

    Hi All


    I need an Excel macro that can open header in Word. The macro I have now can open a Word document and copy some of the cells from Excel to Word. But I need that cells are paste into the header of the Word document. I have tried to record a macro in Word that open the header and then copy that into the Excel macro. But Excel don't accept that code.


    Hope someone can help me.


    Regards
    Alring

    Re: Vlookup


    Hi minitman


    Sorry but I can't help you with that. As fare as i can see then you have to live with the 0.


    Sorry


    regards
    Alring

    Re: Copy cells


    Hi h1h


    Thank you for your reply. When I try to record the macro then nothing happens. I can't record a excel macro at the same time as I do something in word.


    Mads

    Hi all


    I have a macro in Excel 2003 that opens a Word document. And it's working as it should. Now I also want that macro to copy some of the cells from Excel to Word. I have made Excel cells in Word and it's there I want to paste the cells from Excel.


    Is that possible??


    Mads

    Re: VBA to Print a Word Doc.


    Hi Brian


    This code here open and prints the word document.

    Code
    Sub Open_print_word_Click()
    '
        intPrintJobs = Range("A24")
        aNameAndPath = Range("C25")
        Range("A3").Select
        Set appWD = CreateObject("Word.Application")
        appWD.Visible = True
        appWD.Documents.Open Filename:=aNameAndPath
        appWD.ActiveDocument.PrintOut , Copies:=intPrintJobs
    End Sub


    intPrintJobs = Range("A24") is the numbers of copies you want of the word document.
    aNameAndPath = Range("C25") is the name and path of the word document you want to print.
    If you change appWD.Visible = True to appWD.Visible = False then you don't open the document first but just print it.


    Mads