+ Reply to Thread
Results 1 to 4 of 4

For loop for define command button task

  1. #1
    Registered User
    Join Date
    11-16-2015
    Location
    London
    MS-Off Ver
    2013
    Posts
    51

    For loop for define command button task

    Parts of my code is:

    Please Login or Register  to view this content.
    SSave is a Sub.

    Caption of commandbutton"##" is ##. i'th Commandbutton return Allsal & Allmah & "i" in tarikh. How can I write code in a loop for define all button dblClick task?
    Attached Files Attached Files
    Last edited by niksirat2030; 09-03-2022 at 08:15 AM.

  2. #2
    Forum Expert
    Join Date
    05-05-2015
    Location
    UK
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO (Version 2402 Build 16.0.17328.20068) 64-bit
    Posts
    28,169

    Re: For loop for define command button task

    Please post a sample file: instruction in yellow banner at top of the page.
    If that takes care of your original question, please select Thread Tools from the menu link above and mark this thread as SOLVED.

  3. #3
    Registered User
    Join Date
    11-16-2015
    Location
    London
    MS-Off Ver
    2013
    Posts
    51

    Re: For loop for define command button task

    Quote Originally Posted by JohnTopley View Post
    Please post a sample file: instruction in yellow banner at top of the page.
    1- Press Alt+F11 go to UserForm1. I want to summarize the entire code in a For loop.

    2- In the main Form (open by click on "click" button in the middle) by clicking on TexBox From in top and left corner, only the rows of the table in DATA sheet whose values of the DateOfSet column (F) are greater than or equal to TextBox are displayed instantly.

    I designed TextBox To and I try to write code for the upper limit but I can't able to do it. If the user started to enter value in From, the rows with a greater or equal value in F column will be shown in the ListBox. I want if entered a value in To, the rows with lower or equal value in F column will be displayed in ListBox, and if both are filled, rows with numbers (in F column) between the two will be displayed But instantly. That's all the difficulty of this issue.

    3- (Plotting) I want when user enter the year value (in the chart section bottom right of Form) and enter value from and to and pressing the plot2 button, a bar chart will be displayed in a POP UP, each bar of which is the total number of Products in column C for each contractor (list of all contractor in A column in Peymankar sheet) in that year. (Year = First four numbers correspond to the value of column F).

    Also file is attached in first post.

  4. #4
    Registered User
    Join Date
    11-16-2015
    Location
    London
    MS-Off Ver
    2013
    Posts
    51

    Re: For loop for define command button task

    it's should be mentioned that in this post this problem is solved for situation that From and To in top corner of main Form, is of type date and because of I use Shamsi date , I can't use that. Because of this, I have to consider textboxs From and To are of number format.

+ 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. Define activex combobox list by Array and def dbclick action in loop for multiple button
    By niksirat2030 in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 09-03-2022, 10:19 AM
  2. VBA to loop through a variable and move a command button
    By Clouddog444 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 06-19-2020, 12:03 PM
  3. Stopping a loop with a command button
    By pepijndb in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 06-09-2017, 07:06 AM
  4. command Button(Doing two Task) Changes its Naming as requirement
    By John Cruz in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 07-06-2014, 04:29 PM
  5. Intercept a For loop with a Command Button
    By danny2000 in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 05-28-2011, 05:56 AM
  6. for loop with textbox and command button
    By st0kvis in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 01-21-2011, 04:33 AM
  7. [SOLVED] Command Button Color For Next Loop
    By John Wilson in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 09-15-2005, 01:05 PM

Tags for this Thread

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