Posts by smozgur

    Hi Bernz,


    Assuming:
    Sheet1 has unique data
    Sheet1 A column is the unique record number colum
    Sheet2 has details for unique IDs in Sheet1
    Sheet2 A column is the unique record number colum


    Open VBA (Alt+F11) and insert new module (Insert_Module) then paste the code below in this module.



    Now you can call this procedure in another procedure and fire it with a command button assignment:


    Say you want to put a command button on one of the worksheets and want to be asked for the ID to be deleted.


    Goto same module and paste the code below:



    And create a button on any worksheet (and make it Don't Move or Size with Cells if you will use it in Sheet1 or Sheet2) and just assign the ButtonMacro macro to this button.


    I hope it helps.


    :)


    Better solution, Chris :)


    BTW, You are definetely right about performance issue.

    Quote

    Originally posted by Anonymous
    Thank you very much.
    What are the keystrokes "^+{2}" Ctrl-Shift-2 ?
    I changed them to "^{'}" , Ctrl-Aposthrophe


    And it works great.
    Thank you again


    Yep, "^+{2}" = Ctrl-Shift-2 and your one is the same and better for reading.


    You're welcome.

    I assume your procedure is a function and also in a module like below :


    Function MyFunc(myVal As Long)
    Dim i As Integer
    For i = 1 To Len(myVal)
    MyFunc = MyFunc + Val(Mid(myVal, i, 1))
    Next i
    End Function


    Now just goto B10 and write :


    =MyFunc(A10)


    I hope this helps.

    Hi,


    Have you checked Black and White option for that worksheet ?


    Click File_Page Setup and select Sheet Tab then look for the Black and White checkbox is checked in Print section. If checked then uncheck it and click ok.


    I hope this helps.

    Hi,


    This code will update Sheet1's center header by changing A1 cell.


    'Code goes to Sheet1 module
    Private Sub Worksheet_Change(ByVal Target As Range)
    If Target.Address = "$A$1" Then
    Sheet1.PageSetup.CenterHeader = Sheet1.Range("A1").Value
    End If
    End Sub


    Code line also can be changed like below to format font.


    Sheet1.PageSetup.CenterHeader = "&""Arial,Bold""&9" & Sheet1.Range("A1").Value


    You can also modify this code to set same font format with the source cell by using parameters for fontname, bold and size values.


    I hope this helps.