end

  1. S

    VBA to search for values and delete rows

    This macro works great for me for one name but I would like to modify it to allow for additional names to be added. Sub Cdelete() With ActiveSheet .AutoFilterMode = False With Range("d13", Range("d" & Rows.Count).End(x1Up)) .AutoFilter 1, "*NAME*" On...
  2. A

    Referencing controls on a userform that was created dynamically

    I have created a Userform programmatically and created a series of controls on the form. Now I want to read from/write to one of the text boxes. I have tried everything that I can think of to reference to the control, but I'm having no luck. The control was originally created as part of the...
  3. S

    VBA Error 381 - List Property. Invalid Property Array Index

    Hello, I have the following code but is giving me error 381 when I try to run the macro. For now, I have only one entry in my database in column A and over time more will be added. I need combobox1 to give me the list of entries in column A even if I have only or more than one. Can I please...
  4. H

    Excel VBA GetFolder from 2 Drive (2 location)

    I had a code which work very well for 1 location (path) Possible to open and run 2 location? Sub GetFolder() Range("A:L").ClearContents Range("A1").Value = "Name" Range("B1").Value = "ParentFolder" Range("A1").Select Dim strPath As String strPath = "K:\VIEWING" 'strPath(0) =...
  5. L

    when white space is important in VBA?

    Hi the code below is working. However if I do not put white space between x and i in line 6 I would get "expect end of statement" error message. Why white space in important here? Thanks a lot. Sub ws_name() Dim x As String Dim i As Integer x = InputBox("enter name") For i = 1...
  6. R

    VBA not working out

    Hi, I am fairly new to excel VBA and I have tried a bunch of different methods. I am trying to highlight only column I and J, if it is not blank, but also trying to highlight the cells with different colors based on values column G. For now, the code that I have inputted makes the excel change...
  7. Pinaceous

    VBA Private Sub; posting question...

    Good Afternoon, I have a Private Sub that I have posted onto Sheet1 (Sheet1) that works great on its tab. Now, if I wanted to have this Private Sub to work on every sheet of the workbook, I thought I would post it onto ThisWorkbook but it does not work upon every sheet of the workbook. Do I...
  8. C

    Make macro work with upper case and lower case

    Hello! I have the following Macro (below) in a spreadsheet I use to record work times for my employees. In column C there is a dropdown in which they are supposed to choose "ARRIVED," and then a timestamp appears in both column D and P. Similar for column E - they're supposed to select...
  9. gheyman

    VBA code paste as text not formula problem

    I have code that was running great for more than a year. Now its adding in the formula as text so its not doing the calculation any longer "=IFERROR((INDEX(Detail!C[-2],MATCH(CMOP!RC[-1],Detail!C[-2],0))),""DELETE"")" Any help is appreciated Sub StripDown() ' ' Macro1 Macro ' If...
  10. M

    Filter - Date interval

    Hello, My case is as following: I have a database of event participants with their respective participation period (start date and end date) as in below example: Name Start Date End Date Julie 11/03/2019 24/04/2019 Tom 25/03/2019 15/04/2019 Jeff...
  11. M

    Unprotect copied protected sheets and paste a range as value

    Hi All I have this code below, I'm trying to figure out how i can copy protected sheets and unprotect together with copying a specific range and pasting it as value only. Hoping for a quick response. Thank you! ? Sub CopySheets() Application.ScreenUpdating = False Dim MyFolder As...
  12. S

    Macro to hide a specific row in column C with the following macro which I want to use to unhide as a toggle

    Hi all, I have a macro which hides all rows in a column within my specific spreadsheet as per the ranges used. I would like to set my macro up to toggle between hiding and then unhiding so need something to reverse the process. The following is the code I have used: Sub HideUnusedRows() Dim...
  13. N

    Macro to Highlight all matches between two sheets

    I'm looking to implement a macro that would first match a name in column A of Sheet1 with a name in column A of Sheet2. It would then go through every column of that row in Sheet 2 and compare it against the row in Sheet1 and highlight all the matches in Yellow. This is what I have so far but it...
  14. L

    VBA crashes randomly in middle of procedure for only one user

    I created a procedure that splits a file into a bunch of smaller workbooks and then emails them using outlook. I rolled this out to approximately 20 users. It works fine on everyone's PC except one person. On her machine the macro seems to run fine and then excel crashes without warning like it...
  15. 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...
  16. gheyman

    Updating Linked Tables to Back End Problem

    I have a Back End (BE) with all my Tables. When I am solely in the Front End (FE) Database everything runs fine. As soon as another user opens and uses the Front End database the database somehow is loosing the links. We get a message that it doesn't recognize the back end and we have to...
  17. NicholasP

    Email sending with subject line in Chinese Characters

    I have some code that works fine on my machine, but when my coworker runs it, the subject line comes through as Chinese characters. The email still sends with the file attached, but the subject line has the Chinese characters. Has anyone seen this before or have any ideas as to why this is...
  18. B

    excel vba save worksheet as pdf.

    I'm having issues with this code not saving my file. I get an error 1004. it worked before. does any one see any issues with this code? Option Explicit Sub SaveAsPDF() Dim strDir As String strDir = CreateObject("WScript.Shell").specialfolders("Desktop") & "\Daily Reports\" If...
  19. L

    Reference from first and last values in a row

    <tbody> Start Date End Date Jan-20 Feb-20 Mar-20 Apr-20 May-20 Jun-20 Jul-20 A 212 518 623 B 891 218 563 500 C 926 777 </tbody> For the table above, I would like to return the dates corresponding to the first and last values in the row. For...
  20. A

    Macro to autofill month end dates between start date and end date

    Hi Guys, I found a macro in this forum that list all the dates between end date and start date but I can't seem to figure out how to make it only display only month end dates! Can any excel ninja here help me with this? Sub FillDates() Dim StartD As Date, EndD As Date StartD =...

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