+ Reply to Thread
Results 1 to 4 of 4

Remove VBS and change month with other solution (with out VBS)

  1. #1
    Registered User
    Join Date
    09-15-2018
    Location
    Greece
    MS-Off Ver
    2016
    Posts
    11

    Remove VBS and change month with other solution (with out VBS)

    i use this VBS code to change month :

    PHP Code: 
    Sub PreviousMonth()
    If 
    ActiveSheet.Range("A3").Value 1 Then
        
    Exit Sub
    Else:
        
    Range("A3").Value Range("A3").Value 1
        LeaveTracker
    .Columns("B:NI").Hidden True
        LeaveTracker
    .Range(Columns(Range("A3").Value 31 29), Columns(Range("A3").Value 31 1)).Hidden False
    End 
    If
    End Sub

    Sub NextMonth
    ()
    If 
    ActiveSheet.Range("A3").Value 12 Then
        
    Exit Sub
    Else:
        
    Range("A3").Value Range("A3").Value 1
        LeaveTracker
    .Columns("B:NI").Hidden True
        LeaveTracker
    .Range(Columns(Range("A3").Value 31 29), Columns(Range("A3").Value 31 1)).Hidden False
    End 
    If
    End Sub 
    Attached Files Attached Files

  2. #2
    Forum Moderator davesexcel's Avatar
    Join Date
    02-19-2006
    Location
    Regina
    MS-Off Ver
    MS 365
    Posts
    13,481

    Re: Remove VBS and change month with other solution (with out VBS)

    What is the question?

  3. #3
    Registered User
    Join Date
    09-15-2018
    Location
    Greece
    MS-Off Ver
    2016
    Posts
    11

    Re: Remove VBS and change month with other solution (with out VBS)

    i want to change month by other solution with out VBS, this is the question..

  4. #4
    Forum Moderator davesexcel's Avatar
    Join Date
    02-19-2006
    Location
    Regina
    MS-Off Ver
    MS 365
    Posts
    13,481

    Re: Remove VBS and change month with other solution (with out VBS)

    You can use the text() function.
    if you have 1 to 12 in cell(A1)


    Please Login or Register  to view this content.
    Last edited by davesexcel; 09-20-2018 at 12:21 PM.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. [SOLVED] Change VBA code to report last month i.e. May as opposed to this month i.e. June in file n
    By robertguy in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 07-02-2018, 11:09 AM
  2. Change Pivot Table Fields Month by Month Automatically
    By phoebeyanan in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 08-16-2017, 04:03 PM
  3. Replies: 5
    Last Post: 06-28-2015, 08:28 PM
  4. Replies: 3
    Last Post: 07-16-2014, 02:53 PM
  5. Replies: 4
    Last Post: 09-09-2013, 05:06 AM
  6. Remove old month from chart add new/no manual reference change
    By Kameel in forum Excel Charting & Pivots
    Replies: 2
    Last Post: 07-21-2006, 08:45 AM
  7. [SOLVED] how do I use my solver solution on next month's numbers
    By Jim Mullin in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 10-03-2005, 09:05 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1