• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

Error in a macro

Camy

New Member
:awesome:...I run a macro that get the information from tab called RMR Input and feed other tabs. The macro just break due to data type mismatch. I am trying to find the error with no luck. Please Help...Thank you!!!
I am not able to upload the file. It says file is too big.
Error message:
Code:
If M_lMonthlyDataRow = 0 Then
  ltemp = CLng(Piece(sTemp, "/", 1))
  ltemp = FindRow(CDate(CStr(ltemp - 1) & "/1/" & Piece(sTemp, "/", 3)), M_wkstOriginalData, True, 1, , M_Col_Month, M_Col_Month)
  If ltemp = 0 Then
      vbResponse = MsgBox("Could not find monthly data row.  Would you like to continue with RMR Import?", vbYesNo, TITLE)
      If vbResponse = vbYes Then AbortSection = True
 
Last edited by a moderator:
Hi ,

When ever you mention an error in VBA code , please mention the statement where this error occurs.

A type mismatch error occurs because a variable has been declared as of one type , and is being assigned a value which is of another type ; if a variable is declared as an integer , and then assigned a value which is a string , this error is generated.

You need to look at the variable declarations and assignments.

In case your file size is more than 1 MB this forum will not allow you to upload your file ; if you can use a public file-sharing website such as DropBox , RapidShare , SpeedyShare ,... please do so.

Narayan
 
Hi..This is the stament where the macro stopped.
====ltemp = FindRow(CDate(CStr(ltemp - 1) & "/1/" & Piece(sTemp, "/", 3)), M_wkstOriginalData, True, 1, , M_Col_Month, M_Col_Month)====
I will try to upload the file using a public file-sharing.
Thank you very much!
 
Hi ,

Since there is no information about the declarations or about FindRow ( which I think is another coded function ) or about Piece ( which I think is another coded function ) , it is difficult to say what can be the problem.

It will be easier if you upload your file.

Narayan
 
Cannot download the file thru public file-sharing website due to the company firewall. Can I forward you a securemail to your email address?
Thanks lot!!!
camy
 
Back
Top