dim

  1. M

    Remove empty rows from .txt file

    Hello all, I have created a VBA script that pulls data from one document, and exports that data into several different files. There is a blank row in my data (which I want to keep, row 17, i.e. the blank row in between the "Quad#" values and the PlateData value), but instead of showing up in...
  2. T

    VBA to get data from closed notebook and deposit new workbook output into a different file location

    All, I developed a process for a small data set and it now needs to scale to cover large data grabs from outside of the workbook (in closed workbooks on a drive) then have the macro deposit the output into new workbooks in a different file folder (currently my code drops the new workbooks into...
  3. 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...
  4. 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...
  5. S

    VBA HELP: Problem entering data to Excel table with Form

    Hi, I am trying to enter data through a form to an Excel table. But the the data is not going to the table but it starts just below the table and the data entered doesn't belong to the table. All data entry procedures works fine. Just it doesn't enter into the table. Here is the code I used for...
  6. 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...
  7. M

    My macro requires me to press enter hundred times to run query (how to avoid it)

    Hi All, I am new on this forum. I have recently developed a macro through which I am able to list all files present in the sub-folders. However, there are large number of files (in thousands) and once I run my macro, it wants me to keep my hand on enter key for nearly 5 mins. Can any one tell...
  8. V

    Copy variable to clipboard

    I want to copy a variable to the Clipboard and I have used this code in the past and it worked. Now it just returns ?? Any help would be appreciated. Sub test() 'Microsoft Forms 2.0 Object Library is referenced Dim MyData As DataObject Dim strClip As String strClip = Range("J" &...
  9. D

    VBA to copy data from multiple workbooks into single master xls

    Here is what I am trying to do. I have a few spreadsheets in a folder (c:\dump\tally). I am trying to grab the data found in A3:AA3 for each of these files in the "Rollup" tab and drop them into the Excel file hosting the macro in the Sheet1 tab. And since the source data is mostly formula...
  10. R

    Drag-down VBA function (many sheets) snag

    Hi all, I am experiencing the below issue with my VBA drag-down code across many sheets. It works for the first sheet then gets stuck - and help as to why would be appreciated. Here is the error message: https://ibb.co/j4rB86H Here is the code: Sub DragDown() Dim LR As Integer Dim...
  11. T

    run time error issue in VBA

    I am receiving a runtime error 1004 in VBA. It has been driving me crazy. I run a similar line of code three times before this one and this is the only one I am getting hung up on. Somehow it seems I have improperly set the range? It is giving the reference is not valid. Any help would be...
  12. T

    run time error issue in VBA

    Hello, I am new to excel VBA and have been getting stuck on the "run-time error'1004. The formula is missing a range reference or a defined name" the error is in the following line Range("RIFEquipmentTag").Value = RIFEquipmentTag I believe I have set it up the same way as the other items...
  13. B

    Randomize where a random number is limited to the number of repeats

    I have this code to select a random number up to the value I enter in Cell A1 In Cell B1 I enter the number of rows I want to fill. This VBA ensures that each number is only selected once The problem I have is that sometimes Cell B1 is a larger number than cell B2 so I want to be able to enter...
  14. C

    Count down the loops by a number entered on a UserForm until "0"

    Good afternoon Mr. Excel, I have a workbook that runs through code using a UserForm with several TextBoxes and a couple of ComboBoxes. The below code shows what I have so far but I am trying to figure out how to Loop through the code a specific number of times based on a value the user will...
  15. P

    VBA to Add Calculated Field and Measure into a Pivot Table

    Hi: I have the following code which I am trying to use to clear out the data fields in a pivot table and substitute with a data field selected by the user with a macro button. The code falls down on the very last line showing a 'Run time error 5 Invalid call or argument'. Please help! Sub...
  16. D

    read complete row insert as new row

    i've been playing with this all morning but no progress. Any suggestions would be helpful. I'm reading in a xls file looking at column I. When I find multiple entries in col "I" separated by a comma, i need to create a new row for each Item I find and insert it into a new row. Right now I have...
  17. G

    I need a Macro that sends out email with one cells contents

    I need to fix this code so that the body of the email texted out is actually the contents of Button!D44 Not the actual text "Button!D44" this is hat I got Sub TexwhenDone() 'Must add references (Tools > References) to ' 1) OLE Automation ' 2) Microsoft Outlook xx.0 Object Library Dim outlookApp...
  18. B

    Copy sheets from closed workbook

    Hi all, back again with another ask. I have tried the below code (with a slight mod to try and pull the whole sheet rather than the range) to try and call up a workbook (name changes so need to be able to select from file explorer), copy sheets 1-4 and paste in the original workbook that the...
  19. M

    Paste Values

    Hi Quick question I'm trying to copy a data from one worksheet to another. I can now copy the data the only problem is it has a formula. What im trying to paste is the values only and no longer will copy the formula. Here is my code Sub Button1_Click() Dim source As Worksheet Dim...
  20. A

    writing from userform to sheets - overwriting rows above

    I have set up a userform to act as a cancellation form formy users as part of a trip booking model. Each trip has its own sheet (sheetname is the trip name) upon which a user can enter people’s details to attend.If the person changes their mind, I have set up a Cancellation form for theusers to...

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