Posts by Tombola

    I have found that I have had worksheet charts which are taking data from other workbooks hidden in random places on my sheet before, hard to find esp as the GOTO function didn't seem to work.

    You could do a for each loop and output a list, I've just given you a msg box

    Sub Macro10()


    If Not IsEmpty(DrawingObject) Then
    If Selection.Name = "WeekDate" Then
    MsgBox "Sheet " & ActiveSheet.Name & "Contains WeekDay"
    a = 2
    End If
    End If
    End Sub

    I'm not going to give you staep by step but can give a start point.

    You need a sheet to dump your unwanted users to if they fail the login or when they open the sheet.

    Then in the project explorer in VBA editor (alt+F11, ctrl+r) select the sheet, and set the two boxes over the main code to "worksheet" and "activate". Then enter code which will ask a question in an input box and cross reference this aginst you passwords and either let them in or don't.

    Checkboxes are either true or false, you can assign any numberic or text to the answers or retrive trrue or false conditions from you r data.

    Private Sub UserForm_Activate()
    If [c2] = "a" Then CheckBox1 = True Else CheckBox1 = False
    End Sub

    Any use?

    Seems to work fine for me, I've added another module (option b) which does what I think you want on one line.

    Keep me posted!
    '''''Option a
    Sub cplus()
    ' cplus Macro
    ' Macro recorded 06/04/2003 by NAMELESS

    Sheets("Department Budget").Select
    Selection.PasteSpecial operation:=xlAdd
    ActiveCell.FormulaR1C1 = "=RC[-1]-RC[2]"

    End Sub

    Sub newsubtract()
    Sheets("Department Budget").Range("j8").Value = Sheets("Claim Form").Range("L29").Value + Sheets("Department Budget").Range("j8").Value
    End Sub

    Please anyone, I have an excel file which crashed out while saving, I had just spent 3 days, 20 hours a day creating the code in this file. I cannot open the file and cannot find a way in to the file. Does anyone have any tips for extracting VBA from dead files?

    thanks ANDY