+ Reply to Thread
Results 1 to 4 of 4

Type Mismatch error

  1. #1
    Registered User
    Join Date
    12-01-2010
    Location
    New York, USA
    MS-Off Ver
    Excel 2003
    Posts
    7

    Type Mismatch error

    I am trying to write small macro with two buttions where one will open the file from some directory and another exports the file that file into some other direcotry after validation in the data. but I am having

    Type Mismatch error, I am very beginer and not able to figure out also I am not sure I am doing it in right way, here in my code below
    Please Login or Register  to view this content.
    Last edited by Leith Ross; 12-06-2010 at 12:28 PM. Reason: Added Code Tags

  2. #2
    Forum Moderator Leith Ross's Avatar
    Join Date
    01-15-2005
    Location
    San Francisco, Ca
    MS-Off Ver
    2000, 2003, & 2010
    Posts
    23,258

    Re: Type Mismatch error VBA Need help

    Hello smriti,

    Welcome to the Forum!

    Please use code tags when you post your code. It would help to know where the error occurs. Which line in the code is causing the problem?
    Last edited by shg; 12-06-2010 at 01:29 PM.
    Sincerely,
    Leith Ross

    Remember To Do the Following....

    1. Use code tags. Place [CODE] before the first line of code and [/CODE] after the last line of code.
    2. Thank those who have helped you by clicking the Star below the post.
    3. Please mark your post [SOLVED] if it has been answered satisfactorily.


    Old Scottish Proverb...
    Luathaid gu deanamh maille! (Rushing causes delays!)

  3. #3
    Registered User
    Join Date
    12-01-2010
    Location
    New York, USA
    MS-Off Ver
    Excel 2003
    Posts
    7

    Re: Type Mismatch error

    HI thanks for the reply and I will follow that next time, it says Type Mismatch in the

    f.write Cells(ActiveCell.Row, 2).Value + "," 'RATECODE

    in Sub ExportFile() section of the code

    to give you a small overview of what im doing, I have two buttons open file and export file,

    Open file opens the file and its working fine I can see the data but its not exporting to the different directory i want that is where I am having an error

    Any help would be appreciated

    Thanks

  4. #4
    Forum Moderator Leith Ross's Avatar
    Join Date
    01-15-2005
    Location
    San Francisco, Ca
    MS-Off Ver
    2000, 2003, & 2010
    Posts
    23,258

    Re: Type Mismatch error

    Hello smriti,

    Since your file already exists and you want to add data to it, you need to make the change below.
    Please Login or Register  to view this content.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1