We’d like to remind Forumites to please avoid political debate on the Forum.

This is to keep it a safe and useful space for MoneySaving discussions. Threads that are – or become – political in nature may be removed in line with the Forum’s rules. Thank you for your understanding.

📨 Have you signed up to the Forum's new Email Digest yet? Get a selection of trending threads sent straight to your inbox daily, weekly or monthly!
The Forum now has a brand new text editor, adding a bunch of handy features to use when creating posts. Read more in our how-to guide

Visual Basic in Excel

aj9648
aj9648 Posts: 1,389 Forumite
Part of the Furniture 500 Posts
Hi

This may not be the most appropriate place to post this - but is anyone any good with VB code and helping me out as I am stuck??

Sorry if this is inappropriate!!!

Thanks

AJ

Comments

  • isofa
    isofa Posts: 6,091 Forumite
    Yes it's the right place... What are you stuck with?
  • aj9648
    aj9648 Posts: 1,389 Forumite
    Part of the Furniture 500 Posts
    Will PM you isofa

    Thanks
  • isofa
    isofa Posts: 6,091 Forumite
    What you could do is get a list of file names in a directory, save these into a spreadsheet, and the have VBA code step through these, to run, convert and save as CSV by your code.

    You can write a subroutine to access directories, but you'll need a bit of detailed VBA knowledge to step through it all. So you could just save a directory listing in windows, paste it into a spreadsheet, and then work on that instead as the list.
    you'd need to set a variable eg:

    f=Dir(Directory,7)
    and then loop through this saving the file names in a sheet e.g.
    cells(loopcounter,1) = f
    etc

    Does that make sense?

    I'm not in front of a machine with XL/VBA on at the moment, so I can't be more specific.

    There'll be good code snippets at: www.mrexcel.com
This discussion has been closed.
Meet your Ambassadors

🚀 Getting Started

Hi new member!

Our Getting Started Guide will help you get the most out of the Forum

Categories

  • All Categories
  • 353.5K Banking & Borrowing
  • 254.1K Reduce Debt & Boost Income
  • 455K Spending & Discounts
  • 246.6K Work, Benefits & Business
  • 602.9K Mortgages, Homes & Bills
  • 178K Life & Family
  • 260.6K Travel & Transport
  • 1.5M Hobbies & Leisure
  • 16K Discuss & Feedback
  • 37.7K Read-Only Boards

Is this how you want to be seen?

We see you are using a default avatar. It takes only a few seconds to pick a picture.