×
Create a new article
Write your page title here:
We currently have 3,189 articles on s23. Type your article name above or create one of the articles listed here!



    s23
    3,189Articles

    Excel VBA: Difference between revisions

    Content added Content deleted
    imported>Isaac0Jop
    No edit summary
    imported>DrOwl
    m (Reverted edits by Isaac0Jop (talk) to last revision by mutante)
    Line 1: Line 1:
    Some usefull snips of Excel VBA that i use.
    Some usefull snips of [[Excel]] [[VBA]] that i use.




    Line 6: Line 6:


    this macro will Loop through all work sheets doing X...
    this macro will Loop through all work sheets doing X...
    i found this on [http://safepillstock.com/?a=46688 utteraccess] [http://safepillstock.com/?a=46688/forums/showflat.php?Cat=&Number=525063&Main=525027 this thread]
    i found this on [http://www.utteraccess.com utteraccess] [http://www.utteraccess.com/forums/showflat.php?Cat=&Number=525063&Main=525027 this thread]


    <pre>
    <pre>
    Line 29: Line 29:


    </pre>
    </pre>

    [[Category:Software]]
    [[Category:Programming Languages]]
    [[Category:Scripts]]

    Revision as of 14:58, 11 November 2011

    Some usefull snips of Excel VBA that i use.


    work with multiple Worksheets

    this macro will Loop through all work sheets doing X... i found this on utteraccess this thread

    Public Sub UpdatetoNextWeek()
    
    
    Dim w As Excel.Worksheet
    
    
    If MsgBox("Update the week and period details?", vbYesNo + vbQuestion, "Confirm update") = vbYes Then
    
    For Each w In ActiveWorkbook.Worksheets
    
    w.Range("H9") = w.Range("H9") + 1
    w.Range("F9") = w.Range("F9") + 7
    Next w
    MsgBox "Done", vbOKOnly
    
    End If
    
    End Sub
    
    
    Cookies help us deliver our services. By using our services, you agree to our use of cookies.
    Cookies help us deliver our services. By using our services, you agree to our use of cookies.