macros and vba

  1. K

    how to check if a date is old

    I'm creating a database of a library, I created a macro to check if the expiry date of the request that the user made has already passed, if this has happened the cell value should be "Expired Term" otherwise it should be "Pending" , but when the program executes the macro it always shows the...
  2. K

    account validation crashed in vba macro

    I have a macro to check if the user has entered the "Username" and the "Password" correctly depending on the data present in another excel file, it happens that I enter the data correctly and the program detects that the password or user is wrong Private Sub bt_seguinte_Click() 'Oculta as...
  3. K

    Type mismatch in excel Form

    when I start my form I'm getting the error "Type Mismatch" Code: Private Sub UserForm_Initialize() Dim split_name() As String, name_person As String Dim c As Long, contar_usuarios As Long Workbooks(OtherBookPath).Sheets("Usuários").Activate contar_usuarios = Cells(Rows.Count...
  4. K

    Can´t open the Form(Application defined or object error)

    When I try to open the Form I get an error ("Application defined or object error"), can someone help me? lb_erro_email.Visible = False lb_erro_confirmar_email.Visible = False lb_confirmar_checkboxes.Visible = False Select Case True Case Trim(tb_email) = "" And Trim(tb_confirmar_email) =...
  5. K

    Type mismatch in excel array

    I'm creating a macro in vbaque transcribes the values that were assigned to the variables in a specific Excel sheet, it happens that when the program tries to write these values it gives "crash" and the error "Type Mismatch" appears, can someone help me? Private Sub bt_seguinte_Click() Select...
  6. K

    How to use foreach in my current macro

    I created a macro to check if the user name and password are correct when he tries to log in, the code works perfectly but I would like to change it and start using it with the "for each" function, is this possible ? Private Sub bt_seguinte_Click() lb_erro_usuario.Visible = False...
  7. K

    The program does not return the correct value

    I created a macro that detects if the user has entered invalid characters or if the "Textboxes" are empty, but the program is returning the wrong value, can someone help me? Code: Select Case True Case Trim(tb_morada) = "" And Trim(tb_cod_postal) = "" Or (Not IsNumeric(Len(tb_cod_postal)...
  8. K

    Macro is not returning the correct value

    I'm trying to remove a name of a specific file from its directory name, it's not the first time I've done it and I remember using the "Unbound" function last time but instead of the program returning the name to me of the specific file it is returning the number of the field corresponding to the...
  9. K

    Empty date field when it is not

    I'm creating a "Database" in Excel, for that I created a Form for users to register For this Form I created a procedure to check if the fields contain invalid data or if the textboxes are empty the problem is that even if a specific "Textbox" is not empty, the program displays the error...
  10. K

    is it possible to add 2 "variant" variables in vba?

    I have 2 "variant" variables, one with a value of -32 and another with a value of 22 but when I add them the result is -3222, is it possible to really add 2 variant variables?
  11. K

    "type mismatch" in the label caption

    I'm trying to perform a calculation in vba but when the program does it the error "Type mismatch" appears because the result is 0, can someone help me?
  12. K

    Excel crashes after execute code

    once in a while when my excel runs this code it crashes and starts in recovery mode, does anyone know what might be happening? Private Sub bt_directorychange_Click() Dim fd As Office.FileDialog 'A variável "fd" irá corresponder á caixa de diálogo Set fd =...
  13. K

    Variable has no value

    I'm having a problem with the code, my program always works, but sometimes (I don't know why) the variable A2 (only happens with this one) is not passed and takes value 0, because this could be happening? Private Sub cb_Agrid_Click() If Not IsNumeric(in_A2.Value) Or Trim(in_A2.Text) = "" Then...
  14. K

    Variable value changing for no reason

    I'm passing values from one Excel sheet to others, it turns out that the variable P666_2 has the value "xxx.xxxx" but when the value is passed to the other sheet the value is in the format "xxxxxxx,0000", can someone help me solve it this problem? Sheets("Calculation_Sheet").Visible = True...
  15. K

    How to create my own "text to speech" in vba

    I would like to make my own "text to speech" in vba, when the user kept the mouse over a button or a textbox I would like the program to play a specific audio created by me, how can I do this?
  16. K

    I can't log in with my own database in excel

    I'm creating a database in excel, as such I have the users' data and their passwords inserted in the tables (picture), I would like to know if the way I'm checking the credentials is correct because I'm not able to log in with the data I enter even though they correspond to the ones in the...
  17. K

    How to change characters to "*"

    I'm creating a database in excel, I have 2 forms, one for "login" and one for the user to register", in each form I have 1 textbox for the username and another for the password, when the user enters the password I would like each character entered to be presented in the textbox as a "*" but the...
  18. K

    Can I change the keyboard language woth VBA macro?

    The language of my keyboard is in Portuguese, it turns out that due to the insertion of commas and dots in my Excel for my program to work I have to change it to English, it is possible to create a macro that when initialized changes the computer keyboard language to English and when the macro...
  19. K

    "SendKeys" command does not work

    I created a macro that opens a PDF file, inside that same file the macro uses the "SendKeys" command to select how you want to view the page and then double-click Esc to exit the menu and move the mouse to a certain point in da page, the problem is that when the program executes the second...
  20. K

    My workbook doesn´t open

    the path of my file is declared a variable, but the file doesn't open, can someone help me?

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top