Search:

Type: Posts; User: kris01

Page 1 of 4 1 2 3 4

Search: Search took 0.03 seconds.

  1. Replies
    13
    Views
    2,200

    Re: Copy Worksheet & formatting

    ok well lets just agree to disagree on this.... You have helped in previous posts and I thank you for that.


    Rgds


    Goodbye
  2. Replies
    13
    Views
    2,200

    Re: Copy Worksheet & formatting

    because between post #7 an post #8 you changed the line Set b = Workbooks.Add

    Yes because in #7 I took out what I thought was required in-order to get the desired effect. I then tried to write...
  3. Replies
    13
    Views
    2,200

    Re: Copy Worksheet & formatting

    ok. I've updated the code.

    Code is breaking on this line.

    Set C = Sheets("Freehold Managers") Subscript out of range.

    I checked the tab in the FM Report builderExample file...
  4. Replies
    13
    Views
    2,200

    Re: Copy Worksheet & formatting

    So I've started writing the below and defined how to copy the sheet 'FM Master' in terms of formatting.

    Where I get stuck is how to define where to paste the copied sheet into my specific file...
  5. Replies
    13
    Views
    2,200

    Re: Copy Worksheet & formatting

    Morning.

    Don't think its as simple as that.

    I've removed the email part and left with the below.

    The below code doesn't save the file in the new workbook under the new worksheet.
  6. Replies
    13
    Views
    2,200

    Re: Copy Worksheet & formatting

    No. I just want a new macro to be created. I want to copy the worksheet - FM Master....and paste into a new workbook called. FM report builder.xlsx.

    When copying the file and pasting. I...
  7. Replies
    13
    Views
    2,200

    Re: Copy Worksheet & formatting

    Hello.

    The issue of the file name has now been resolved. Hence why I've started a new thread. I simply removed Reports as you suggested.

    This is a now a new thread where I wish to copy...
  8. Replies
    13
    Views
    2,200

    Copy Worksheet & formatting

    Hi,

    Wish to copy the attached worksheet, (formatting, row/column size, No formula's) and pastevalue special into a new file called FM Report Builder. Worksheet - Freehold Managers.


    New...
  9. Replies
    31
    Views
    5,561

    Re: Paste value special

    That part of post #28 is complete now.

    I'll start a new thread because I think you're getting confused.
  10. Replies
    31
    Views
    5,561

    Re: Paste value special

    oh ok. See what you mean now. Sorry. That worked.

    Any joy on the second part of my post #28

    Thanks

    Kris Morris
  11. Replies
    31
    Views
    5,561

    Re: Paste value special

    The file path is not the problem. Its the name of the file that's being saved down. How do I change it?



    Also. Need a new macro using the below, but instead of attaching the file to an...
  12. Replies
    31
    Views
    5,561

    Re: Paste value special

    ok problem fixed. The l and the 1 look familiar.

    One more issue though and this is relating to the attachment name.

    myfile = mypath & Format(Date, "MMM") & " PM Template.xlsx"

    The...
  13. Replies
    31
    Views
    5,561

    Re: Paste value special

    The error message is - Compile error: Syntax error.

    Breaks on this line.

    .Cells(1, 1).Resize(lr, lc).Copy b.Sheets(1).Range("a1")
  14. Replies
    31
    Views
    5,561

    Re: Paste value special

    Hi. Get a compile error on the last line.

    Also. The attachment name is wrong. Need it to say - FM MMM PM Template.xlsx.
  15. Replies
    3
    Views
    844

    Re: Apply Ranking

    I see. So can't be done by the normal way?
  16. Replies
    3
    Views
    844

    [RESOLVED] Apply Ranking

    Hi.

    Wish to apply ranking method to the attached table.

    1st Ranking I want to apply in Column K

    Apply a ranking (1 being the oldest) to each individual on Overdue status (Column F) For...
  17. Replies
    31
    Views
    5,561

    Re: Paste value special

    Thanks so much. That's worked a treat.

    How do I get the columns to auto re-size?
  18. Replies
    31
    Views
    5,561

    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. ...
  19. Replies
    31
    Views
    5,561

    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...
  20. Replies
    31
    Views
    5,561

    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...
  21. Replies
    31
    Views
    5,561

    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...
  22. Replies
    31
    Views
    5,561

    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 =...
  23. Replies
    31
    Views
    5,561

    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...
  24. Replies
    31
    Views
    5,561

    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...
  25. Replies
    31
    Views
    5,561

    [RESOLVED] 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...
  26. Replies
    23
    Views
    3,960

    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...
  27. Replies
    18
    Views
    3,353

    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.
  28. Replies
    4
    Views
    1,162

    Re: additional tab

    Perfect. Thank you.
  29. Replies
    4
    Views
    1,162

    Re: additional tab

    Breaks on this line....

    compile error

    Argument not optional.

    x.copy b.sheets(,1)
  30. Replies
    18
    Views
    3,353

    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...
  31. Replies
    23
    Views
    3,960

    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.. ...
  32. Replies
    4
    Views
    1,162

    [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...
  33. Replies
    23
    Views
    3,960

    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...
  34. Replies
    18
    Views
    3,353

    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. ...
  35. Replies
    23
    Views
    3,960

    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...
  36. Replies
    18
    Views
    3,353

    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...
  37. Replies
    18
    Views
    3,353

    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?
  38. Replies
    23
    Views
    3,960

    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...
  39. Replies
    23
    Views
    3,960

    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...
  40. Replies
    18
    Views
    3,353

    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...
Results 1 to 40 of 128
Page 1 of 4 1 2 3 4



Click Here to Expand Forum to Full Width