Search:

Type: Posts; User: kris01

Page 1 of 3 1 2 3

Search: Search took 0.02 seconds.

  1. Replies
    20
    Views
    784

    Re: Paste value special

    Thanks so much. That's worked a treat.

    How do I get the columns to auto re-size?
  2. Replies
    20
    Views
    784

    Re: Paste value special

    Hi.

    This is proving to be a little tricky. :-)

    If for example. I did the below, manually without any coding then we should be able to replicate these actions via some coding.

    1. ...
  3. Replies
    20
    Views
    784

    Re: Paste value special

    Hello.

    Sorry for the delay in responding.

    I've added in the code as suggested in post#10.

    but as suspected it didn't have the desired effect I'm looking for.

    a) The attachment...
  4. Replies
    20
    Views
    784

    Re: Paste value special

    Ok. I've put the below code in and receiving Method'Pastespecial' of object 'range' failed.

    b.Sheets(1).Range("a1").PasteSpecial xlPasteValues Or xlPasteFormats

    Do I need to specify the range...
  5. Replies
    20
    Views
    784

    Re: Paste value special

    I'm not sure if this would work though. What happens if cell A1 had a red background? Only the value and format of the font would be copied over.

    I want the value and the background to be...
  6. Replies
    20
    Views
    784

    Re: Paste value special

    I did try to enter the code in Red but when I ran the macro, the file size I was creating went from 2mb to 98mb. Why does the size increase so much when applying formats?


    Set w =...
  7. Replies
    20
    Views
    784

    Re: Paste value special

    Ok. I've put the below code in and receiving Method'Pastespecial' of object 'range' failed.

    b.Sheets(1).Range("a1").PasteSpecial xlPasteValues Or xlPasteFormats

    Do I need to specify the...
  8. Replies
    20
    Views
    784

    Re: Paste value special

    Thanks for all the feedback everyone.

    The above worked in terms of removing the formula's as I specified. I should have also mentioned I wish to keep all the formats from the original file...
  9. Replies
    20
    Views
    784

    Paste value special

    Hi.

    In the below code I create a excel workbook, save it to particular path and then attach the file to an email.

    However the file being copied and saved to the specified path is being copied...
  10. Replies
    23
    Views
    1,359

    Re: Import file using mapping table

    Ok. Not sure if the shared path is the problem. The path is the exactly the same as the other thread, so i know the path is ok.

    Saying that.... I moved the csv file to the - .Team Documents...
  11. Replies
    18
    Views
    929

    Re: Apply filter and import results.

    Ok nearly there. Problem has been fixed.

    Just one further requirement. I need the column headers in the CSV file to be copied over as well.
  12. Replies
    4
    Views
    387

    Re: additional tab

    Perfect. Thank you.
  13. Replies
    4
    Views
    387

    Re: additional tab

    Breaks on this line....

    compile error

    Argument not optional.

    x.copy b.sheets(,1)
  14. Replies
    18
    Views
    929

    Re: Apply filter and import results.

    Hi,

    Code breaks on the below line.

    The microsoft access database engine cannot open or write to the file ". It is already opened exclusively by another user , or you need permission to view...
  15. Replies
    23
    Views
    1,359

    Re: Import file using mapping table

    Hi,

    I'm using the exact code as you tested but still getting the

    Could not find installable ISAM. error message. Breaks on the .open line.

    As the code worked for you, but not for me.. ...
  16. Replies
    4
    Views
    387

    [RESOLVED] additional tab

    Hi

    I have the below code which copies a tab called Mainstay Master. Creates a xls then sends to a particular mail group with an attachment.

    Where do I add the code if I want to copy another...
  17. Replies
    23
    Views
    1,359

    Re: Import file using mapping table

    Hello,

    I've included two files in my zip attachment.

    1. Sample. Master file that requires the csv to be imported using the mapping table on the control tab.
    2. HS Assigned...
  18. Replies
    18
    Views
    929

    Re: Apply filter and import results.

    Hi. Sorry. Not sure what you mean by posting with code tags??

    I've attached a new zip file that includes a CSV file which hopefully you can test.

    Is it better to use "microsoft.Jet.oledb. ...
  19. Replies
    23
    Views
    1,359

    Re: Import file using mapping table

    ok this is my code now and switched the code to csv.

    Getting a different error message on this line now. - Could not find installable ISAM

    .Open

    Dim cn As Connection, rs As Recordset...
  20. Replies
    18
    Views
    929

    Re: Apply filter and import results.

    Ok I'm getting an error message on this line..... - No value given for one or more required parameters

    rs.Open "select * from [Insurance Ledger.csv] where [Type]='Buildings - Property Owners' and...
  21. Replies
    18
    Views
    929

    Re: Apply filter and import results.

    ok the below code is breaking.

    cat As ADOX.Catalog

    I presume I need to reference this somehow. Which option do I select in the tools>reference table?
  22. Replies
    23
    Views
    1,359

    Re: Import file using mapping table

    I've changed the code where it says myxls to mycsv as the actual file I need to open is in CSV format.

    The code is breaking on .open.

    Error message says the 'External table is not in the...
  23. Replies
    23
    Views
    1,359

    Re: Import file using mapping table

    Dim cn As Connection,

    Hit a compile error on the first line. User-defined type not defined.


    What do you mean by referencing to ADO?



    I want the data copied to a sheet...
  24. Replies
    18
    Views
    929

    Re: Apply filter and import results.

    Thanks for that. Very interested in this.

    Just want to understand for my own learning. Why is it preferable to use SQL for this particular problem?

    I've now included a workbook so we can...
  25. Replies
    23
    Views
    1,359

    Re: Import file using mapping table

    Here you go.

    I've submitted the workbook i posted earlier.


    179403
  26. Replies
    18
    Views
    929

    Re: Apply filter and import results.

    ok fair enough. Not sure how to do that though. Would prefer to code it via VBA. That would be my preference
  27. Replies
    23
    Views
    1,359

    Re: Import file using mapping table

    Sure. How do I attach a workbook? thought I could only post images?
  28. Replies
    18
    Views
    929

    Re: Apply filter and import results.

    Hello.

    Yes SQL would probably be easier but that would involve setting up a database which is not possible.

    I've included attachments.

    Here you can see the data I wish to import and I...
  29. Replies
    23
    Views
    1,359

    Re: Import file using mapping table

    Hello,

    Very good point you have raised in relation to duplicates.

    In terms of FF. When we get to FF - I want that row to be imported and all then proceed to the next row. If that row...
  30. Replies
    18
    Views
    929

    Apply filter and import results.

    Hi.

    i have a file that is saved down to a particular folder that I wish to import.

    w:\.team documents\freehold team\freeholders managers\reporting\reports\Insurance Ledger.csv

    However I...
  31. Replies
    23
    Views
    1,359

    Re: Import file using mapping table

    Hi,

    So basically.

    Example

    I want the macro to look for the first id in the mapping table on sheet.control. In this case AA. I have defined the range of the mapping table called...
  32. Replies
    23
    Views
    1,359

    Re: Import file using mapping table

    Hi Westconn.

    Any ideas on how I can achieve the below?
  33. Re: Save worksheet and send as attachment

    Ignore my previous message. I've solved the problem. Cheers.
  34. Re: Save worksheet and send as attachment

    Ok. What's the best way to reference the cell address?
  35. Re: Save worksheet and send as attachment

    B.sheets(sh).delete. Worked. Thank you.


    Yes timestamp2 has been defined in the original workbook which is why the above doesn't work. What's the code so it picks up the defined name in...
  36. Re: Save worksheet and send as attachment

    Breaks at....

    sh.delete.

    Object required.

    Do I need to add sh As Object at the start???


    I've tried to qualify the range using the below code but its not working.
  37. Re: Save worksheet and send as attachment

    ok that's worked brilliantly. Just a few modifications i need to make. Simple ones as well.

    1. The file that I have saved down. Remains open. How do i close (MMM PM Template) after its...
  38. Replies
    23
    Views
    1,359

    Import file using mapping table

    Hi,

    I wish to import a file from a particular drive but instead of importing the whole file i want to only import the rows that are contained in my mapping table.

    The unique key in the...
  39. [RESOLVED] Save worksheet and send as attachment

    Hi,

    I wish to create a new macro that basically performs the below functions.

    1. Save a worksheet (Master) to a particular drive with all the
    same formats as .xlsx

    File path....
  40. Re: import multiple files into one worksheet. Crate a loop.

    Hello.

    That's brilliant. Really helpful and now found what's the problem.

    I have of course found a new issue whilst testing which i didn't originally think off. I need to clear the...
Results 1 to 40 of 112
Page 1 of 3 1 2 3



Click Here to Expand Forum to Full Width