programming

  1. 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...
  2. 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...
  3. 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...
  4. 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...
  5. K

    Macro for writing to specific Excel spreadsheets

    I want to make a macro that just inserts values in cells where the name of the worksheets is different from "Potable C1", "Potable C2", "Potable C3.1", "Potable C3.2", the code is not working because it is writing in all spreadsheets, can someone help me? Dim sh As Worksheet Dim counter As...
  6. 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...
  7. 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...
  8. K

    Automatic executable creation

    Is it possible to create a vbs file similar to the same one but that is automatically executed when a new file is inserted in the folder?
  9. 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
  10. K

    The program does not detect a specific folder

    I am trying to open the most recent file in a specific folder but when I run the program an error appears and says that the folder does not exist (but it does exist), can someone help me? Code: Private Sub WriteValues() Workbooks.Open (myMostRecentFile)...
  11. K

    Procedure doen´t result

    Hello guys, i have a problem in my procedure, everything that happens before trying to execute the procedure is read by the program, but when we call the procedure it doesn't just work in the specific form, can someone help me? This codes works: Private Sub bt_calculate_Click()...
  12. K

    Can someone tell me how to leave the number with only 4 decimal places?

    The "error": The code: Dim oPL As Double, o709 As Double, o710 As Double, o713 As Double Application.ScreenUpdating = False Sheets("Calculation_Sheet").Visible = True ActiveWorkbook.Sheets("calculation_sheet").Activate Note: P666, P709, P710 and P713 are global variables...
  13. K

    Can anyone tell me why is this appening?

    Private Sub UserForm_Initialize() Call CallTime_Msg lb_hello.Caption = msg lb_tec.Caption = Tec End Sub Sub CallTime_Msg() Dim mHour As Integer Dim msg As String mHour = hour(Now) If mHour < 12 Then msg = "Good Morning" ElseIf mHour < 18 Then msg = "Good Afternoon" Else msg =...
  14. K

    can someone explain this to me?

  15. K

    Set Focus doesn´t result (???)

    I'm trying to select a textbox from my form in excel with the command #set focus "but apparently it gives me an error, can someone help me? Error: Private Sub cmd_Recheck1_Click() A0r = in_A0r.Value A90r = in_A90r.Value A_90r = in_A_90r.Value A1 = 0 A2 = A90r - A0r...
  16. K

    Can anyone tell me why my file isn´t save with this code?

    Since I added the time format the code stopped working, is there any way to include the time in the file name? Code: Sub SaveAsPDF() 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" FilePath...
  17. D

    How do I fill a cell depending on the ListBox value?

    Hello! EDIT: Wrong title, sorry For this problem of mine, I know what I need to do, but I'm not really sure where and how to implement it properly. So: If the checkbox is selected, and the first combobox is selected, the options for the first combobox will be allowed to be selected. Then, if...
  18. T

    Styles of programming in VBA

    I have come to the conclusion there appears to be two distinct styles of programming in VBA. 1. Those with no prior experience of programming. 2. Others who are already conversant with Java, C#, etc. I have seen VBA code such as: Function MyFunc (somearg As Burger) As McDonalds and then...
  19. J

    Programming the VBE with VBA

    Hi. I read through Chip Pearson's Programming the VBA Editor and his examples are working for me. What I want to do is programmatically control the font in the VBE code modules without using the Font Dialog because that dialog does not exist on the Mac. After checking the Object browser, it...
  20. M

    Insert rows in a sheet based on values from other sheet

    I have 2 worksheets in a workbook, both have 2 columns as shown in Images below Sheet 1 : <tbody> FLOC COMP ABC-123 C1 ABC.124 C1 ABC.125 C2 ABC.126 C2 ABC.127 C3 ABC.128 C4 </tbody> Sheet 2 : <tbody> Comp MAT C1 A1 C1 A2 C1 A3 C2 A4 C2 A5 C3 A6 C4 A7 </tbody> I...

Watch MrExcel Video

This Week's Hot Topics

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
Top