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 8024625
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T22:54:56+00:00 2026-06-04T22:54:56+00:00

At every button click I want to be able to make visible 4 textboxes

  • 0

At every button click I want to be able to make “visible” 4 textboxes and 4 labels. I am not sure how to do this using VBA code.

Here is what I have tried out so far:
There are no errors produced but I do not know how to proceede from here.

Private Sub Command36_Click()

Static Counter As Integer
Dim Name As String
Dim Name2 As String
Dim Count As Integer

Counter = Counter + 1

Name = "Label" & Counter
Name2 = "Text" & Counter
Command36.Caption = Name & Name2

For Count = 1 To Count = Counter

Microsoft Access Forms, VBS

  • 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-06-04T22:54:57+00:00Added an answer on June 4, 2026 at 10:54 pm

    I think you mean:

    Private Sub Command36_Click()
    Dim Name As String
    Dim Name2 As String
    Dim Count As Integer
    
    
       For Count = 1 To 4
          Name = "Label" & Counter
          Name2 = "Text" & Counter
          Command36.Caption = Name & Name2
       Next
    
    End Sub
    

    I do not quite see what is the point of the above.

    This might be of more use, if, as you say, you want to make something visible:

       For Count = 1 To 4
          Name1 = "Label" & Counter
          Name2 = "Text" & Counter
          Me(Name1).Visible = True
          Me(Name2).Visible = True
       Next
    

    Do yourself a favour and make sure you give controls “real” names, not Command36, but something like cmdShowLabel

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I want to add an element after every like button (chrome extension). Since posts
I want to draw a rectangle on button click event horizontally aligned to the
Basically, I have a button and on click it displays a menu. I want
hi every 1 i have a problem in my jquery i want this adjust
I want to be able to create and unknown number of objects. I'm not
i want to play sound with click event of my button click event in
In my application I am adding a UIimage on every button click. As user
I want to be able to detect a single click or a double click
I have a lot of button inside my application and for every button i
I try build wrap panel with vertical buttons. Every button consist from image 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.