type mismatch

  1. C

    With 'Set StrVal=ActiveCell.Address' and ‘Dim StrVal As String’ I get 'Object required' error With ‘Dim StrVal As Range’, a ‘Type Mismatch’ error

    I need to copy the ActiveCell.Address to a string variable to test if a cell is in a range for the Intersect function. I would be very grateful to anyone who could resolve this problem for me. I would also be grateful for any suggestions or comments on the other code in this macro. My thanks...
  2. Z

    VBA Outlook export calendar items - Code 13 type mismatch error

    I created a code for exporting calendar appointments from outlook. It runs perfectly for me, however we get code 13 error on one of my collegue's computer who is supposed to use the macro. The error is at the "Next" line, and she uses the same outlook version as me. Can anyone please help me...
  3. M

    Auto mailing with conditions - problem with mismatch

    I have two sheets, one with email adresses and date when mail was sent - "Biura_podr". Another one with with code used for sending emails - "Mail". In sheet with mail adresses and send dates I have this code, which is checking if email was sent already in this month: Public Function...
  4. D

    vbam type mismatch error

    Getting a type mismatch error on the if statement line, i am not sure why any help would be grateful! Sub mastermod() path1 = thisworkbook.worksheets("FilePath").range("D5") path2 = thisworkbook.worksheets("FilePath").range("D7") path3 = thisworkbook.worksheets("FilePath").range("D10") if...
  5. L

    VBA to use activesheet selection in Transpose

    Hi I am using the built-in function Transpose to convert an array to a string and would like to use the current selection ie change this Comments = Join(Evaluate("TRANSPOSE('Base'!A1:A10 )"), vbNewLine) to Comments = Join(Evaluate("TRANSPOSE(Selection )"), vbNewLine) The latter gives a...
  6. Z

    Type Mismatch error when having user select files

    Hello, I have the following code, which opens up a dialogue box and allows the users to select 1 or more files at once. If the user does not select any files (i.e. they hit cancel), I want the macro to end. The code below works if the user does not select any files, however, if they do I get a...
  7. S

    VBA: Run-time error 13: Type mismatch

    Hey everybody. Error 13 (type mismatch) occurs when I try to run this macro. Nevertheless, I can't find out which data types are incompatible. Could you help me to find it out, please? Here is the code. Public Sub Macro1() Dim m, n, p As Double Dim x1, x2, xmin, z As Double m =...
  8. G

    Error running this code - If ActiveCell.Value = "#N/A"

    Hi, hope someone can help. I'm trying to run this code but when the cell value is "#N/A# I get an error 'type mismatch', note that the cell value is text not the formula =NA(). If ActiveCell.Value = "#N/A" Then ActiveCell.ClearContents ElseIf ActiveCell.Value = "Error" Then...
  9. J

    Type mismatch on cell values after VBA update

    Hello all, I'm hoping to get some help with the following issue. I've written a set of macros around a few worksheets that I analysed for a thesis project. The project is now finished but I'm doing some follow up work and thought it would be safe to update my Office 2016 for Mac now. After this...
  10. D

    Type Mismatch issue

    Hi all. I have a userform with 3 TextBoxes (ones having an issue anyway) to adjust the value in the respective cells on an Employee Information worksheet. The Balance is shown as a label.Caption using Application.VlookUp for the employee shown in a ComboBox called Reg2. Reg9, Reg10 and Reg11...
  11. X

    Index with multiple match (Loop) when one of the Match is a Date ( VBA ) - Value Mismatch

    Hi I am trying to do index match Loop through Columns first and then Rows with multiple criteria in VBA My Source data is like: <tbody> Date email ID Attendance Status 22/08/18 Bob22@tiptop.com Present 22/08/18 Milan@tiptop.com Present 22/08/18 Samuel@tiptop.com Present 23/08/18...
  12. T

    [Run-time error '13': Type Mismatch] Returning New Custom Object

    I had this working yesterday and earlier this morning so I'm not sure what changed. ConveyExtract and BillingValidationExtract are both custom objects I've created that both implement a class called Extract. I have the following line getting slapped with a Type Mismatch error: Function...
  13. A

    Type Mismatch

    Hi there. I am an occasional VBA programmer and have run into a type mismatch problem that has me stumped. I am using the ancient 2007 edition of Excel (not my choice) and the following code in my macro works: Set rngCohort = wsScrap.Range("A1:A" & lngScrapLast) varCohort = rngCohort.Value...
  14. A

    Run-time error '13': Type mismatch

    Hello everybody! I got some amazing help last time I posted, so I'll give it another go. I'm still very new to coding in excel and find myself stuck with a Run-time error yet again. This is the code I'm working with: Private Sub Worksheet_Change(ByVal Target As Range) Dim n As Long If Not...
  15. G

    Run-time error '13: Type Mismatch

    I am trying to do a dynamic "Hide Rows" function where if a certain cell in a row has any value a number "1" will populate the A cell of that row, an example would be if cell B11 has value A11 will be equal to "1"... What I had the macro doing was hiding all rows where A = "" The code had been...
  16. M

    Issue With Proceeding Only if Object Exists

    Hello, I am attempting to generate an organized list of all entries from multiple sheets which have a date, description (vendor), cost, category, and subcategory. I am looking to have them sorted by the date based upon their description (vendor), and to display the original date, description...
  17. M

    Need to select different columns from one sheet and paste them into another sheet

    Hi Experts, I need to Select certain columns from one worksheet and copy them into a different worksheet, since the number of records may vary from one day to the other, I'd like to make my selection dynamic, so I can copy and paste all the records, no less no more, I've tried with this code...
  18. T

    VBA Type mismatch

    Hi, I get a type mismatch in my code. when i reference to another cell. What have i tried: 1. I have entered the number that is in the referenced cell manually (see red below). Now the code works fine. 2. In a new excel sheet i have isolated and tested my problem and there i don't get a type...
  19. andrewb90

    Run Time Error 13 in one WB but not the other

    Hello all, I am getting a run time error 13 in one particular workbook, but not another. I'm not entirely sure what could have changed, but I know its not the code in the sub. I copied the same code from another workbook that the code is functioning properly and resulted in the same issue. If...
  20. J

    Run Time Error 13: Type Mismatch

    Hi, I am receiving a "Run Time Error 13: Type Mismatch" with the following code. Any thoughts? I cant figure out what to do. On this line: Ins = Sh.Cells(n, "A").Value Sub InsertRows() Dim End_Row As Long, n As Long, Ins As Long Dim Sh As Worksheet For Each Sh In...

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