If this is your first visit, be sure to
check out the FAQ by clicking the
link above. You may have to register or Login
before you can post: click the register link above to proceed. To start viewing messages,
select the forum that you want to visit from the selection below.

Excel Auto-Formatter

Hi, I'm using VB 2010 Express. I want to make a program that I can just drop in an excel doc, and it auto formats it for me. I recorded a macro and then dropped it in my VB worksheet below what I wrote to call the excel doc (below is the code). Problem is many of the references of the recording aren't referencing properly (have a squiggly line). How do I connect this to the excel doc opened with the top few lines?

Re: Excel Auto-Formatter

Ok I found out part of the problem is that it's saying 'Active Worksheet'. Is there any way to make a loop of the first part of the formatting code and do it on every sheet/tab that the called workbook has? So it will only run once for a 1 tab book and 5 times for a 5 tab book?

Re: Excel Auto-Formatter

Look up HOW TO CODE an EXCEL WORKSHEET in VB.Net. You'll see that you need to create a few NEW references, and how to call them. Once you figure that out, it's not that hard to convert code. Here's a link: http://code.msdn.microsoft.com/