Posts by Fluppe

    I have a sheet with only the option:
    Unprotect Shared Workbook under Tools/Protection.
    When I want to view the code I get a msgbox "Project is locked" "Project is unviewable".
    I know that there is no password.
    What can I do to disable the protection?


    I want to use 2 comboboxes on a sheet where the value of cbo2 depends on the selection in cbo1.
    ie when I choose fruit in cbo1 I'll only get banana and pineapple in cbo2.
    I know how I can create it with the datavalidation but not with VBA code.
    Can someone helpme with the code please?



    I use the following syntax for protecting my worksheet:
    Activesheet. protect userinterfaceonly:=true
    But how can I prevent that a user uses tools/protection/unprotect worksheet so that my protection is gone?


    What's the difference between Str(cells(26,1)) and the String function?

    Your IF statement shows that the value in celA26 is not a number but text.

    m_control.Value = Str(Cells(26, 1)) is no good.

    Dim a as string
    a = Cells(26, 1)
    m_control.Value = a

    When I'm using this, the value of cell(26,1)
    is put in the m_control as a string.

    Hello Dave,

    I want to use the substitute function in VBA. How can I do that?

    The variable text contains the string were I have to substitute the "-" and the " ".


    A cell contains text i.e. A1 = text-word 1. The caption of lbl1 in formtext must be the text of cell A1. Only
    the “-“ and the “ “ must be taken away.
    So I get textword1 in lbl1.
    What to do if I don’t know were the “-“ and the “ “ is put in the text?

    This is maybe a stupid question but I don't know how to do it.
    Is it possible to change the textheight of my fullpath in footer (with VBA Excel) without changing my default textheigt settings?

    ActiveSheet.PageSetup.LeftFooter = Me.FullName



    In col. A1 to A10 are the data.
    In B1 a begin data
    In B2 an end data
    The result in B3 will be the number of data that appears between the begin and the end data.

    Fill in the following formula in B3