command

  1. B

    using a cell reference in a range command in VBA

    Hi everyone, I am new on here and have a small problem. I want a command button to copy a range of cells and past somewhere else on the sheet. Simple enough I know, but if I have range("A1:A10") no problem, but I want range(A1:A&H1). I know this won't work, but I want the value to change to...
  2. F

    VBA input box help

    On: Sheets("Players") I have a command button, when clicked this runs: Private Sub CommandButton1_Click() Dim Player1 As Variant Player1 = InputBox("Enter Player 1") ActiveSheet.OLEObjects(1).Object.Caption = Player1 ActiveSheet.OLEObjects(1).Object.BackColor = 49152 End Sub On...
  3. T

    Create ribbon button to run macro

    Hi, Can anyone help point me in the right direction to run the code Import_SOR_Data1 by selecting a command button in the ribbon? How to create the command button please? Also not sure if the macro is in correct place in the linked form Regards, Wayne Copy of VOID VALIDATION KCxllinestyle.xlsm
  4. D

    Add multiple Macros to single click Command Button

    Hi all, I want to reset both my data validation dropdowns and manual entry cells with a single click of the Command Button. I already have the code for the dropdowns from a previous thread, what Macro/VBA should I enter to reset all manual entry cells to blank, and how do I combine the two to a...
  5. D

    Command button caption to show what is selected in the listbox.

    Hi, Please can someone help me? I would like my commandbutton1 caption to show what is selected in my listbox1. Any help would be appreciated. Thanks Dan
  6. S

    A convenient way to batch rename ( not caption ) multiple command buttons on Userform ?

    Hi, I am creating an Userform with several command buttons on it. Is there a way to batch rename them as : cbButton1 cbButton2 cbButton3 cbButton4 cbButton5 … ? Note: I hope to give new names to them. not to change their captions. The way I am using now, is simply click on them 1-by-1, and...
  7. A

    Code efficiency

    I have 10 command buttons named cbTC#. The code below works good, however Is there a better way to code this without having to write the code below 10x (1 for each command button)? Thanks Private Sub cbTC1_Click()If Len(tbx800) > 0 Then If MsgBox("Do you want to delete data?", vbYesNo) =...
  8. TAPS_MikeDion

    Can you change a button group lock options to True/False with 1 command?

    Just wondering if I can shorten my code a tad by changing grouped buttons with 1 command instead of two. For example: If you have a group of two radio buttons (for this example I'll call the group "NewEmp") and you want to lock or unlock them, do you have to use two commands (i.e...
  9. H

    How to save a file using "if then or else" in case the 1 drive is not found

    <ytd-expander id="expander" class="expander-exp style-scope ytd-comment-renderer" style="display: block; --ytd-expander-button-margin:4px 0 0 0; --ytd-expander-collapsed-height:80px;"><yt-formatted-string id="content-text" slot="content" split-lines="" class="style-scope ytd-comment-renderer"...
  10. J

    check for duplicate in excel table before adding new

    Hello I am fairly new to VBA and i am looking to create a tabel without having someone enter duplicate records over and over by hitting the AddReturn button over and over. below is what i am using for the command button. Any Idead what i should add to stop this? Private Sub AddReturn_Click()...
  11. A

    eliminating command button from userform with empty relative cells

    Hi there! I have some problem and I will wonder if you help me on this. I have a calendar with 12 command buttons with name month_1, month_2 , ... ,month_12 and almost 365 command buttons with name day_1_1, day_1_2, ... ,day_12_29 and also 365 cells in a separate worksheet relative to this...
  12. M

    Convert one column of long data into multiple columns based on a specific string of text

    Hi experts, I have a long list of data exported into excel from a text file. This file contains output of a command from multiple network elements. Whenever there is a text string 'Welcome to', the below mentioned text should be copied to a new column till the next 'Welcome to' appears. In this...
  13. J

    Userform Command Button - Match range/copy row

    Hello, This is my first post. I've tried searching this out without success. Probably because my VB skills are non-existent. Anyway, what I'm trying to accomplish is, I have a userform with a command button on sheet5. When the button is executed, I would like index/match sheet5 column A against...
  14. T

    Listbox enlarges as entries are made until command buttons are covered.

    I have a form with a listbox. The form is set up so that I type entries into a series of text- and comboboxes, and then press a command button to add the values into the listbox (see picture...
  15. C

    Spinning Button carry over to a new row

    Hey all. Need help on my project. So, I have 2 sheets. Sheet 1 is where the 2 Spin Button and a Command Button is located. Sheet 2 is where the data get recorded. Basically, what the Spin button does is to count each click. I already have the code for this. The Command button will add a new...
  16. A

    Help with VBA issue using command button on separate page

    Hi All, having an issue with my code and hoping someone can help. I have a workbook that has 2 sheets, 1 is the master data sheet the other is the active sheet "Allowed repair" with 2 buttons, search and clear contents. I have set the command button to execute the following VBA macro in a...
  17. I

    Save print range to pdf file using command button

    Morning, I wish to save a range from my worksheet in the pdf file type. The code below works fine with no errors etc but when i view the saved pdf i can see my command buttons which on the worksheet are in columns D & E When i press the command button i only wish to save what i can see in the...
  18. E

    Excel 2016 error

    Hello all, I have issue where one of our Excel spreadsheets suddenly shows following error message. External Data Refresh Failed This Command requires at least two rows of source data. You cannot use the command on selection in only one row. We were unable to refresh one or more data...
  19. A

    Comment with scroll bar

    Can I create a comment template with a scroll bar using VBA which gets trigger through a command button
  20. A

    2 Command buttons to perform 2 simple task

    Can i have a command button on my dynamic worksheets to perform the below function (I have created a button to copy the work sheet, so the new buttons would be copied too ). 1. View button - to highlight or show a range of cells / table in the worksheet 2. Color button- selected cell would be...

Some videos you may like

This Week's Hot Topics

  • Problem with Radio Button's format control
    I am creating an employee evaluation template (a sample is below) Column A is the category Column B, C D, E and F will be ratings (unacceptable...
  • Last Display on userform to a Listbox
    [CODE=vba] lstdisplay.ColumnCount = 15 lstdisplay.RowSource = "A1:O600000" [/CODE] So when i do this it Displays everything on the sheet i am...
  • Rename and move files to a new location
    Dear all, I have an excel file with the following information. The actual file name is at column A but i want to rename it using the following...
  • Help with True/False Formula
    Hello! Am stumped how to fix this formula, in which my result returns 'True', but it should return False. =IF(AG2=True...
  • Clear extra characters from a provided range of cells
    Dear All, I have following code which gives me desired output to remove extra characters from a provided range. But it takes too much time when...
  • Help with Current and highest streaks
    Hi there, I've just joined the forum and this is my first post. I've already spent quite a bit of time searching the net and this forum for a...
Top