type mismatch

  1. Z

    run-time error 13: type mismatch in VBA (Excel 2007)

    Hello, I'm writing a VBA program and receive "run-time error 13: type mismatch" In the code below the line in bold receives the error. <code> Let FactornEMA(nEMA) = 2 / (FactorMA(nEMA) + 1) 'run-time error 13: type mismatch Let Cells(1 + nData, colEMA(nEMA)) = FactornEMA(nEMA) *...
  2. R

    Break Links code returns Type Mismatch error

    This code give me a "Type Mismatch" error, but I can't figure out the issue. Can anyone see what is mismatched? All this is meant to do is to break all links to other workbooks. Sub BreakLinks() On Error GoTo ErrorHandler Dim vLinks As Variant Dim lLink As Long vLinks =...
  3. S

    While Loop with Type Mismatch

    I have a while loop that counts backwards in a seriescollection to find the last value with data. In one particular case, I had to use an IF formula in the source data where it would output NA() if the statment was false, so instead of loop through empty strings until the loop finds a number, it...
  4. J

    copying ranges to a variant

    I am referring to http://support.microsoft.com/kb/213798 and have the following variation on the theme: Public Sub Demo() Dim i As Integer Dim htable As Variant Dim h As Range Dim ws As Worksheet Set ws = Workbooks("Demo").Worksheets("Blocks") Set h = ws.Range(ws.Cells(2, 1)...
  5. O

    Type mismatch mystery

    Hi All. I have a replace string sequence in a userform and it has worked perfectly for a long time... until now. The problem seems to be if the person has a long 'position' name (value in Sheets2 B1) or multiple positions separated by commas. Sheets 2 B1 is formated as text...
  6. A

    Stumped on vba type mismatch error (Pivot Macro)

    Hey All, So I've been able to identify some factors for an error that is getting thrown in a macro I've written, but I'm really stumped on what is causing it and how to deal with it. The basics of this macro is to take a range of cells and create a new pivot table. The macro should be able to...
  7. H

    Type mismatch error when using array element to activate a window

    Hello, I don't know what is wrong with my code. I created an array with the file names in my module 'SAVING FILE NAMES For c = 1 To lNum myarray = Split(myfiles(c), "\") numelements = Application.CountA(myarray) filenames(c) = Split(myarray(numelements - 1), ".")...
  8. D

    FormatDateTime Problem

    Hi, All, Looking for some help with my first UserForm. :biggrin: I am building a UserForm that brings essential fields of a very wide spreadsheet into a smaller more usable area. Some of the fields required are dates calculated from earlier dates. I've got it working so I can view all fields...
  9. R

    Error 13, Type mismatch help please

    Hello, I'm developing a code that is suppose to convert the NumberFormatt of a number depending on it's unit (m3 or L) My code works for the most part but once I try to delete more than one cell at a time, the program crashes and a debugger window opens saying "run time error 13: Type...
  10. J

    DeBug Error

    Hi there, Hope someone can help me with this. I got a userform with textboxes that has formulas in. On the form I also have a clear form button, I have the following code: Private Sub Fitness_Change() TextBox27.Value = Fitness.Value * 7500 End Sub Private Sub UserForm_Initialize()...
  11. J

    Activate windows of files stored in arrays, but getting subscript out of range error??

    I'm trying to write a copy and paste program that lets the user select which xml files to merge and then in sequence opens up the xml file selected second and paste it into the first selected file (top file in final completed file), opens the xml file selected third and paste it into the xml...
  12. T

    Run-time error '13' Type mismatch

    Hi everyone, From what I already read on this forum this is a very common error but the existent threads didn't help me though. This is the first time I'm programming in Excel/VBA and I'm doing something really simple. I need this for image processing: I have two columns with x and y...
  13. H

    run time error 13 type mismatch when clearing multiple cells

    Hello All - First time Poster here, name is Tim. I've been working on building an Excel document, when based on user input into a certain cell, prompts them for information and places received information in a cell. I have all that working to my liking, however, I'm getting stuck on a Run Tim...
  14. R

    Type Mismatch

    Everytime I run this code I get a "Run-time error '13': Type Mismatch" and I can't figure out why. Can anyone tell me what the error means and how to fix it? Thanks! Sub populateComboBox() Dim lr As Long With Sheets("Data Sheet") lr = BlankRow("Data Sheet", 2, 4)...
  15. 0

    Use the .List method to read numbers from dropdown (combo)

    Hey, I am working on a bit of code that will read data from a series of columns in a database, a dropdown menu is used to display unique values from one of the columns. I then want to read the value that has been selected from this dropdown and then display a value in the same row but on a...
  16. M

    Type Mismatch error SQL query

    So I'm trying to copy databases over to another in order to revamp them. I'm having trouble with two different databases. Both are used to pull data from an existing table and the information is used to pull other data. You should note that the same code is used in the original database and is...
  17. Y

    Run-Time Error 13 VBA

    Hi there. Not too sure what i can do to fix this coding, basically when the checkbox is checked, it adds one to a particular cell on another workbook. Sub CheckBox1_Click() strFirstFile = "C:\Users\owner\Desktop\Test Over WBK" strSecondFile = "C:\Users\owner\Desktop\Statistics Runpage" If...
  18. R

    Checking for empty cell in vba

    Hi, I am in the middle of testing my first attempt at using VBA code and to my dismay am running into difficulties. I have used the following VBA code in a For loop to check for empty cells in a spreadsheet: If Cells(i, 1).Value <> "" And Cells(i, 13).Value <> "" And Cells(i, 20).Value <> 0...
  19. C

    VB problem - obsolete command/wider issues

    Hi all, I'm currently trying to update a macro that was written in an earlier version of Excel, and I'm getting an error that I'm not sure what to do with. The module that's getting called early in the program starts like this following (excluding Dim statements): For iCount = 0 To 10...
  20. C

    Type Mismatch, mixed-character cell values

    Greetings, Panel. After a cursory search of similar problems, I have come up nil, so I am resorting to a post. The exercise is to do a simple VLOOKUP, using a column of values for the lookup value that can be things like this: 87592BR40725, 892338840627, C31624F40809, 897928+40613, etc...

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