macros and vba

  1. K

    I can't insert the array values in the excel sheet

    I'm trying to insert values into an excel table with the help of an array, it happens that when the program executes only the first value of the array is inserted in each specified range, how can I change this? Private Sub FillCells() Dim myarray_ac_before As Variant, marray_ac_after As...
  2. K

    I can't update the excel chart

    I'm trying to update a chart every time a record is inserted in the last line of Excel, so I created a variable "k", the problem is that when I run the program I get an error that I can't solve, can someone help me? Code: Public Sub Chart_Update() Dim k As Long k = Cells(Rows.Count...
  3. K

    I can´t range the cells interval

    I created a code so that each time a record was inserted into a line the program would detect the last line with values (assigned to the variable "k") and select a specific interval for the graph to update, but an error occurs, could someone help me ? VBA Code: Public Sub Chart_Update() Dim...
  4. K

    Error selecting range with variable

    Criei um código para que cada vez que um registo fosse inserido numa linha o programa detetasse a última linha com valores (atribuido á variável "k") e selecionasse um intervalo específico para que o gráfico atualizasse, mas um erro ocorre, alguem me podia ajudar? Public Sub Chart_Update()...
  5. K

    Choose the site to save the PDF file

    The following code I created is to save the Excel sheet PDF file in a specific folder with a specific filename according to the value of the variables Dim FilePath As String Select Case MachineName Case "A4", "A8.1", "A8.2", "A8.3", "A12.1", "A12.2", "A12.3", "A20.1", "A20.2"...
  6. K

    I cannot create a chart with the value of the fields entered in each specific cell

    I created a dynamic chart that allows organizing the data according to the name of the field "Machine" and the "Data", the problem is that instead of the chart showing the values of each field it counts the number of values entered on the same date, someone can you help me? I need to insert...
  7. K

    Variable value does not pass between the 2 books

    I'm trying to run a macro of my book 2 ("Corrections_Data.xlsm") from my book 1 ("Machine_Data.xls"), in my book 1 I have two variables called "k_miter" and "k_machine" that count the last line filled in a certain column in a specific spreadsheet. For the value of the variable to pass from one...
  8. K

    Subscript out of range error

    I'm trying to pass data from one excel sheet to another, but when I run the program it gives a "Subscript out of range" error, can someone help me? Public Sub recentFilesSpecificFolder() counter = 14 Dim myFile As String, fileExtension As String Dim myRecentFile As String...
  9. K

    How can I do to assign the value to my cell according to the "SUM" function (present in another Workbook)

    How can I do to assign the value to my cell according to the "SUM" function (present in another Workbook) Set sh = Workbooks("EEC QEC.xlsm").Worksheets(counter2) k = Workbooks("EEC QEC.xlsm").Sheets("QEC 1.2 - montagem").Cells(Rows.Count, "H").End(xlUp).Offset(1).Row Workbooks("EEC...
  10. K

    "The specified dimension is not valid for the current chart type" error

    I created a macro to insert data from an excel spreadsheet into another Excel file, but when I run the program the error "the specified dimension is not valid for the current chart type", can someone help me? Variables (Module2) Option Explicit Public myRecentFile As String Public counter...
  11. K

    Object Required at Long Variable (???)

    I created a code to pass data from one excel file to another (it is a little confusing project because I am in a company), I believe that the code is correct in general but when I run the program it gives an error called "Object Required" in the variable " k ", can someone help me? Module...
  12. K

    "object doesn't support this property or method"

    "object doesn't support this property or method" can anyone help me? If sh.Name = "QEC 1.2 - montagem" Or sh.Name = "QEC 2.2 -SALA LIMPA" Or sh.Name = "QEC 2.4 Logística" Or sh.Name = "QEC 4.1 - MONTAGEM MANUAL(past)" Or sh.Name = "QEC 4.2 - Desmoldagem" Or sh.Name = "QEC 4,3 - RTM" Or...
  13. K

    How to use "range" with a text value of an integer value

    I need to use the "range" parameter to select a specific cell, it happens that when I "run" the program it gives an error and says "The specified dimension is not valid for the current graph" Error -------------------------------------------- If Range("H(CStr(k))").Value = "" Then...
  14. K

    I can't copy the files to another Excel spreadsheet

    I am trying to create a macro that passes values between 2 different excel files, I tried to create a counter whenever the values are inserted in the spreadsheets, the program does the same for all the spreadsheets available in these files, in case the cell where the value will be inserted the...
  15. K

    The program does not write the value on the sheet

    I created a code to open the most recent file in a specific folder and copy the value if a specific cell to another in a different excel file, the program executes everything, including I receive the value "msgbox" but the values are not written on the second sheet " EEC QEC.xlsx ", could...
  16. K

    Macro help for inserting data in spreadsheets!

    I want to create a macro to insert a value in cell "U37", but that value can only be inserted in spreadsheets with the name other than "Potável C1", "Potável C2", "Potável C3.1", and "Potável C3.2" I know my code is not right but I currently have the following: Dim ws, counter As Integer...
  17. K

    Cell with incorrect value

    I created a procedure that writes a specific text in the cell is empty, but when this occurs the value entered is always "TRUE" can someone help? Public Sub WriteValues() Ws = ActiveWorkbook.Sheets.Count For counter = 1 To Ws Worksheets(counter).Select...
  18. K

    Creating a procedure to search in a column

    I have 3 columns A - Equivalent to "Machine Name" B - Equivalent to "OT Number" C - Equivalent to "Responsible Technician" I would like to know if it is possible to create a procedure that when the user inserts the "OT Number" the procedure looks in column B if there is already an "OT...
  19. K

    Object Required Error

    I have a form called "Miter_2_Correc", and I don't know why vba won't let me open it, can someone help me? Code: Private Sub bt_calculate_Click() Call CheckEmpty End Sub Private Sub CheckEmpty() If Not IsNumeric(tb_x1.Value) Or tb_x1.Text = "" Or Trim(tb_x1.Text) = "" Then...
  20. K

    Write a value on all worksheets in the workbook

    Good afternoon friends, is there any way to write a value in a specific cell on each sheet of the excel workbook using "Foreach" or in some other way? Example: Write the number 3 in cell A3 of each sheet of the current workbook

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