Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 551681
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T11:25:11+00:00 2026-05-13T11:25:11+00:00

I have 14 command buttons on my form. what i want to do is

  • 0

I have 14 command buttons on my form. what i want to do is change the text of the form based on the current date.
button1 should have todays date.
button2 should have tommorows date.
button3 should have day after tomorrows date and so on. I want this for fourteen buttons.

I can do it manually by assigning each button.text to each date… i want to do it using a loop. is it possible.
my buttons are named , button1,button2,button3,button4, and so on toll button 14.
and the text i want on them is from the current date to 14 days later…
basiocally want to display the dates on the button..
is it possible though a loop.
m using visual studio and vb.net

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-13T11:25:11+00:00Added an answer on May 13, 2026 at 11:25 am

    You could try something like

    Dim dateVal As DateTime = DateTime.Today
    For i As Integer = 1 To 14
        Dim but As Control = Controls("button" & i)
        but.Text = dateVal.ToString("dd MMM yyyy")
        dateVal = dateVal.AddDays(1)
    Next
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a form and two command buttons. I want that on pressing the
I have one main form, and i want to dynamically change it's content, via
I have a form that has three submit buttons as follows: <input type=submit name=COMMAND
I have a Form UserForm1 having two command buttons command 1 and command 2.
I currently have 2 command buttons and one listbox. Based on listbox selection, the
My command object have a list of objects. I want to bind a text
I have a command line program, which outputs logging to the screen. I want
I have a .doc with a command button (cmdStart) which opens a form. After
I have created a basic form in access that has a couple of buttons
I want to have a form input that one would enter a number and

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.