end

  1. J

    Simplify Fraction UDF Error

    I have a Simply Fraction UDF which works fine whenever the numerator is less than the denominator, but fails other wise. For example for n = 50, d = 75 it outputs 2/3 but for n = 5 , d = 4 it is failing. Any reason? Private Function reduceFraction(n As Integer, d As Integer) Dim numL As...
  2. S

    VBA Help - "Delete Method of Range class failed"

    Hi folks, i'm getting a Run-Time Error '1004' "Delete method of Range class failed" for the following code. Sub Satisfied() Dim MasterSht As Worksheet Dim ImportSht As Worksheet Dim LastRow As Long Dim x As Long Application.ScreenUpdating = False Set MasterSht = ThisWorkbook.Sheets("Master...
  3. R

    Opening a Workbook from a File Dialog Box

    I would have thought that this should be fairly straight forward but I'm running into issues on opening additional workbooks from a userform. So yes, I have a userform with a button that when clicked opens up a number of additional workbooks. Is this a problem with the string sent to...
  4. C

    Strange Windows error that only affect my Excel files

    I'm on Windows 10. When I'm working in Excel occasionally my screen starts flashing for about 1 minute (no pattern to when or why it happens ... it just randomly starts). During this time I can't click into any Excel cells or do anything in Excel. The other applications on my computer work fine...
  5. M

    Finding the end of the body of an Outlook Email

    I want to paste two ranges into an Outlook email. I can create the email, filter for the range, copy and paste the range. The problem is with where the second range pastes. In the first three emails, everything works correctly. Then, the code does not correctly find the end of the message to...
  6. E

    Automatically update cell.value as long as a ActiveX checkbox is checked - excel 365 on WINDOWS

    C2.value is updated when a button is clicked. My wish is that so long cbox1 is checked O17.value = C2.value Private Sub cbox1_Click() If Me.cbox1.onValue = True Then Sheet1.Range("O17").Value = Sheet1.Range("C2").Value End If End SubWith this code I need everytime click the checkbox...
  7. A

    Copying multiple rows of data and create a different spreadsheet per row

    I will try and explain as best as I can.. Basically, the company I work for needs a way to copy the data from a worksheet and paste it into a job card... At the moment, I have only managed to be able to write the VB so it creates one job card at a time (see below) Sub CreateJobCard()...
  8. I

    Edit for existing working code

    Morning. The code below works but looking for an edit please. I type AB02 in the search box & the listbox returns the results from column E I wish to now type AB02 but in the listbox be able to see not only like before the results from column E BUT also column F,G,H So it would look like this...
  9. I

    Search box code doesnt select correct cell on worksheet

    Morning, I have taken this code from another worksheet & made the edits for it to work on my new sheet. I type in the search box say AB & all the results with AB are shown in the listbox. I select the item i require. My problem is that the item i selected isnt selected on my worksheet in...
  10. G

    Error with the below code "Can't find project or library"

    Hi Everyone, I am working in a project and below is my complete code. Option Explicit Sub Try() Dim TOrig As String, STMonth As Long, SCMonth As Long, ECMonth As Long Dim I As Long, J As Long, CMon, cCol As Long Dim lrow As Long Dim add_month As String add_month = InputBox("Insert the...
  11. D

    Save and close a wb

    I have some code that is meant to save and close the workbook identified in the select statement (Wes_reference or Riv_reference) but it is not closing it. What have I left out? Sub AddReference() Dim wb1 As Workbook, wb2 As Workbook Dim sh1 As Worksheet, sh2 As Worksheet, site As String Dim...
  12. A

    Error 1904 - sometimes

    Attempting to write a Comment with Sub WriteComment(r as Range, T) with r if not .Comment is Nothing Then .comment.Delete end if .addComment T end with End Sub And I call this with Dim CRange as Range Set CRange = WorkSheets(SheetName).cells(RowNumber,ColoumLetter) WriteTheComment cRange...
  13. I

    Could you check my code, userform to worksheet please

    Hi, The code is shown below. I have a userform with Comboboxes ComboBox1 is MONTH ComboBox2 is YEAR Month is to be inserted into cell A3 Year is to be inserted into cell C3 When i press my transfer button the YEAR isnt shown on the worksheet but the MONTH is entered into cell A3 Please can...
  14. I

    Open userform when worksheet opens advice

    Afternoon, I would like the userform to open when i open the workbook. At present i have the following which works fine when i navigate worksheet to worksheet but need some advice please for it to run when i open the workbook. Private Sub Worksheet_Activate() If Range("A2") = "" Then...
  15. I

    Can you check & advise on my userform code please

    Morning, The code im using is shown below. I have used a code from another userform where it had two comboboxes & now wish to use it on a worksheet where there is only one combobox. Some info for you. Worksheet called SUMMARY SHEET Year for combobox is on worksheet called LIST which is in the...
  16. A

    Stop picture flashing as resized.

    I didn't write this and can't remember where it came from. Consists of a Form and a class module. An image file is loaded via the Forms Picture property, and a "handle" on the Form lets you drag the picture to any size. It's brilliant. Except as you drag the picture it flashes and looks awful...
  17. B

    VBA: Open PDF with GGS in filename

    I was wandering if someone could help me edit the code below to open the pdf in the file that has the letters GGS in the file name? Public Sub openJOBLIST() Dim path As String Dim PDFfile As String path = "\\hq\dfsdata\Data\UserHomes\jamey.eerson\My Documents\pdf-NEW\Latest...
  18. H

    Create sheet after last sheet

    I have a sheet called "Costing Sheet" I have written code to put todays date - 5 days in col A1 on Sheet "Costing Sheet" and the copy the sheet after the last sheet and then to name sheet based on month and year in A1 for eg Oct-2019 I get an application defined or Object defined error and...
  19. S

    problems with audit trail

    Hi all I have the code below which should record changes to cells in a worksheet - recording cell, old value, new value, time, date and domain name of person that made changes. It works well, except: 1. the old value is never recorded and just shows a blank. how do I record the old value...

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