Posts by Fluppe

    Hi WillR,
    This works and I can use it because the cell can't contain a number.

    Hi Ranger,
    I can't use the ISTEXT function because of the formula =if(A1="";"";A1) excel will format this cell as text when it is blank and will colour it red but the cell must be white when it is blank.

    A cell must change red when it contains text. The cell ie A2 must stay white when it is blank.
    The cell contains a link A2=A1
    The problem occurs when my cell contains the following formula ie =if(A1="";"";A1).
    When A1 is blank A2 is also blank but excel thinks its still text so it is coloured red.
    How can I solve this problem.
    Any idea?


    Hi, Roy
    The example you gave me works perfect but I don't think that this is what I need.

    I want to store the userform1 in a "mainpage" because I have alot of workbooks that contain the code I don't want to copy the userform to each workbook because when I have to change something on the userform I have to do it a hundred times instead of one time in the "mainpage".
    I don't want to open the userform1 in the mainpage and then go to a certain workbook. When I'm in a workbook I want to open the userform stored in the mainpage.

    I don't understand the example that Andy gave me.

    Fluppe :(

    Hi royUK,
    in the example the module and the userform are in the same file.
    When I want to show your userform but the code pasted in another module in another workbook I get a runtime error '424' object required.
    I'm using excel2000.

    Hi Andy,
    I want just one userform that can be used in different workbooks. I don't want to copy every userform to each workbook.

    Hi royUK,
    Maybe I did something wrong because the ShowModal doesn't seem to work?


    I have a question:
    I have a userform in workbook 1.
    I want to open that userform when I click a commandbutton in workbook2.
    Workbook 1 and 2 are opened.
    How can I do that?


    Hi Andy,

    Thank you very much for answering my question instead of enjoying your tea break. :D

    Maybe someday I can help you,...

    I think I do understand a little more.
    Just one little question:
    What does the 46 stands for?
    vbKey0 To vbKey9, 46
    I thought I had to acces the ascii tabel by entering a decimal or hexadecimal number?
    So ie. number1 = decimal 49 or hexadecimal 31 ? Am I wrong?

    Fluppe :thumbcoo:

    Hi Andy,
    I'm just learning VB since 2 months and I don't understand your code so good.
    I just don't know what I have to change to manipulate the code.
    I just tried to change a few words but I actually don't understand what I'm doing.

    I want to use the beforeupdate function for a few textboxes on a userform.
    When a user enters text instead of a value it must return a msgbox.
    Maybe you can give me a tip?

    Tanx Abdy :yes:

    I have tried to change the code in Andy's example in hope that I could use it, but I didn't manage it.
    Is there maybe someone who can help me working this out or other suggestions?
    Fluppe :(

    I'm using a userform with several textboxes. I want to check them on userinput.
    When the input is text it must return a msgbox, when it's a value it can go on to the next textbox.
    I'm using the following code to do the checking.

    Private Sub txt1_BeforeUpdate(ByVal Cancel As MSForms.ReturnBoolean)

    If Not IsNumeric(txt1) Then
    MsgBox "test"
    Cancel = True
    Cancel = False
    End If

    But do I have to copy the code for each textbox ie txt1 to txt10 or can I use a loop? Any suggestions are welcom.

    Thanx very much,
    Fluppe :tumble:

    I have 2 workbooks where some cells of wb2 are linked to cells in wb1.
    When i open wb1 A msg is promped with the question : to update all linked information, click yes
    to keep the existing info, click no.
    Is it possible that excel updates the values immediately without asking me to do it?


    I use the following code to add the pathname in a footer.

    Private Sub Workbook_beforePrint(cancel As Boolean)

    For Each sht In ActiveWorkbook.Sheets
    Ampersand = Chr(38)
    Quote = Chr(34)
    FooterFormat = "Arial"
    FooterTextSize = "8"
    FooterText = ActiveWorkbook.FullName
    Formatting = Ampersand & Quote & FooterFormat & Quote & Ampersand & FooterTextSize
    FOOTER = Formatting & FooterText
    sht.PageSetup.LeftFooter = FOOTER
    Next sht

    End Sub

    But sometimes it gives a result like
    P:\test\demo.xls and another workbook with the same code gives
    Sometimes the code gives the drive letter of the server, in this case P, and on another workbook it gives the fullname of the server. :(
    I want to see the driveletter and not the fullname (P:\test\demo.xls ). How does this come and what can I do about it?


    Hi Dave,
    I didn't look that good to Willy's suggestion.
    My workbook was shared and with unsharing it the problem was solved.

    Thanx, and I will try to sleep more this night :yes:

    I tried to use the unprotection software and I took a look at the check box for sharing workbook but nothing of this could help.

    Still any ideas?