Posts by alring

    Hi


    In a userform I have two textboxes. What I write in these two textboxes I want to put in two different cells. I have this code here. But there is something wrong. Please help me.



    Alring

    Re: Input box


    Hi Roy


    As the macro is now then comes there two input boxes. If I understand you correct thenis it not possible to have two lines in one input box. If that's correct then I will make a Userform instead.


    Thank you for your help. :thanx:

    Re: Input box


    Hi Roy


    The two input lines that I want to have in one inputbox is not to be gathered. What i write in the two inputlines I will insert in two different cells in the worksheet.

    Hi there


    I ahve a hyperlink that opens an another documnet. I use this hyperlink in different documents. But most of the name for the document that i want to open is always the same. It's ony´ly the last part that change.


    So in one document the hyperlink opens 6666-DOC-402-03.pdf. But in an another document the hyperlink opens 7777-DOC-402-04.pdf. Is it possible to write the hyperlink so it automatic take the highest number after the last -. The number in front of the name e.i."6666" I change manualy.


    Alring

    Hi there


    I have an inputbox with one input line. Is it possible to have two input lines in one input box?


    Right now I have two input boxes to write the two things I want to write. But it will be great only to have one input box with two input lines.




    Alring

    Re: Text in inputbox


    Hi thomach


    Thank you for your reply :thanx:


    I have tried to run the macro with and without Option Explicit and the macro works in both ways. The mistake I made with your code was still to have As long instead of As String.


    Alring

    Re: Text in inputbox


    Hi Will


    Also thank you to you for your reply. :thanx:


    I was using Long because it was working with the numbers in another macro. Now I can see that I can use string no matter if it's letters or numbers. But I will remember the numbercodes you gave me.


    Alring

    Re: Text in inputbox


    Hi Thomach


    Thank you so much for your help. It works :thanx:


    I can see that you wrote in the beginning of the macro:


    Code
    Option Explicit


    I tried the macro without that code and then it didn't work. So what does that do with a macro??


    Alring

    Re: Text in inputbox


    Sorry!!!!!


    Code
    With Ark1


    Should have been:


    Code
    With Sheet1


    The reason for the mistake is that my Excel is danish.


    Alring

    Hi there


    I have this code here. But when I run it then the only thing I can right in the inputbox is numbers. But I want to write letters in the inputbox. What is wrong with the code?? :?


    Please someone help me.



    Alring

    Re: If function in VBA


    Hi Fengore and Dave


    I have solve the problem. Both of you thnak you for your help. :thanx:


    The code work when it look like this:



    Again. Thank you :thanx:


    Alring

    Re: If function in VBA


    Hi Dave


    Thank you for your reply. :thanx:
    There is just one small problem. I would like to use .cells(1,1) and .cells(2,1) and .cells(3,1) instead of A1 and A2 and A3. I have tries to change your code to that but I can't get to work. Maybe it's because it's not possible. or maybe I write the code wrongly. The last thing is very possible. :? Is it possible to use .cells instead of letter and number for the cells??


    Alring

    Hi there


    I have (for me) a big problem. In the attached document I have a formula in cell D7. D7 links to cell A7:A9. And it works. Now I want that I can do the same thing in VBA but the result should be in cell D1. D1 links to cell A1:A3.


    I have made the formula in cell D7 to explain what it is I want . I'm not going to use that one in the future but only the VBA code.


    Please someone help me.


    Alring

    Re: Conditinal formatting according to text


    Hi Bob


    If I write the code like this then it works



    If I don't write


    Code
    Case Else
                 icolor = 2


    Then will all the cells that is ampty under one cell that is not empty be the same color as the one above.


    Alring