Results 1 to 6 of 6

(SOLVED) InputBox vba code to start in cell A1

Threaded View

Stona (SOLVED) InputBox vba code to... 03-16-2020, 04:11 AM
Crooza Re: InputBoc vba code to... 03-16-2020, 04:38 AM
Stona Re: InputBoc vba code to... 03-16-2020, 04:58 AM
Crooza Re: InputBoc vba code to... 03-16-2020, 05:07 AM
Stona Re: InputBoc vba code to... 03-16-2020, 06:05 AM
Stona Re: InputBoc vba code to... 03-16-2020, 08:08 AM
  1. #1
    Forum Contributor
    Join Date
    01-23-2020
    Location
    Namibia
    MS-Off Ver
    2016
    Posts
    117

    (SOLVED) InputBox vba code to start in cell A1

    Good day

    Please help

    I have this vba code when u click on the macro it asks for the day of the month (todays date) in the inputbox and then shows as a message

    i want when the macro is run to the 1st day of the month and then it must start in cell A1 on the excel sheet and populate downwards.

    Sub Calender()
    
    Dim dStart As Date, dDay As Date
    Dim i As Integer, sCal As String
    Dim sRange As String
    
    dStart = InputBox("Start", , Date)
    
       
    
    For i = 0 To 30
        dDay = dStart + i
        If Weekday(dDay) <> 1 And Weekday(dDay) <> 7 Then
            sCal = sCal & vbCr & Format(dDay, "ddd" & vbTab & "dd.mm.yyyy")
        Else
            sCal = sCal & vbCr
        End If
        
    Next i
    
    MsgBox sCal
    
    
    End Sub
    Attached Files Attached Files
    Last edited by Stona; 03-16-2020 at 08:09 AM. Reason: Problem was Solved

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Replies: 3
    Last Post: 01-28-2020, 02:14 PM
  2. [SOLVED] how to change this code to start from a specific cell and to last row
    By Chaos00 in forum Excel Programming / VBA / Macros
    Replies: 21
    Last Post: 07-12-2019, 10:18 AM
  3. start at certain cell all the way down for code execution
    By StevenDerp in forum Excel General
    Replies: 4
    Last Post: 10-31-2017, 05:47 PM
  4. Code to recgonize non-numeric "Left"/start of cell in cells of dynamic column
    By horrockc in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 12-28-2016, 10:19 AM
  5. start code in selected column/Cell
    By FDibbins in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 10-12-2015, 07:35 PM
  6. [SOLVED] Code to access active cell and start a new line
    By ChemistB in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 02-01-2013, 02:16 PM
  7. Code to check if cell value start with int.
    By Rob* in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 11-23-2012, 07:56 AM

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