From: Bob Barnes on
Looking for automation code to have in a "Template" Workbook
that will run code in an Excel File received from Management.

This code would make a DBF from the Excel File received from Management.

TIA - Bob
From: Sam Wilson on
The following looks for an open workbook called test.xls, finds a sheet
called "Sheet1" in it and colours cell A1 light blue. It can be placed in any
other workbook & will still work:

Sub demo()

dim wb as workbook
set wb = workbooks("test.xls")

dim ws as worksheet
set ws = wb.worksheets("Sheet1")

ws.range("A1").interior.colorindex = 37

end sub

You can use activeworkbook etc rather than setting wb to a pre-named
workbook etc.

Sam


"Bob Barnes" wrote:

> Looking for automation code to have in a "Template" Workbook
> that will run code in an Excel File received from Management.
>
> This code would make a DBF from the Excel File received from Management.
>
> TIA - Bob
From: joel on

Is it sufficient to save the workbook as a DBF file or is there
something else required? If you simply went to the worksheet and did a
SAVEAS to DBF is that acceptable? A macro can easily be written to do
this. Or is there something else the macro need to do.


--
joel
------------------------------------------------------------------------
joel's Profile: http://www.thecodecage.com/forumz/member.php?userid=229
View this thread: http://www.thecodecage.com/forumz/showthread.php?t=153064

[url="http://www.thecodecage.com"]Microsoft Office Help[/url]

From: Bob Barnes on
Joel - It's a Daily Excel file including data for many Depts, including our
Dept.

I can easily do that manually, but as a Contractor, I'm not here every day.
I want to have a regular Mgr here run a macro to make the DBF when I'm not
here.

I'd like a "template" Excel File that will Find the Daily
File..IE..Data_111109, and then make it a DBF. I saw an Archive Post you had
in Sep this year which will help, but needed automation code to another Excel
file.

Thank you - Bob


"joel" wrote:

>
> Is it sufficient to save the workbook as a DBF file or is there
> something else required? If you simply went to the worksheet and did a
> SAVEAS to DBF is that acceptable? A macro can easily be written to do
> this. Or is there something else the macro need to do.
>
>
> --
> joel
> ------------------------------------------------------------------------
> joel's Profile: http://www.thecodecage.com/forumz/member.php?userid=229
> View this thread: http://www.thecodecage.com/forumz/showthread.php?t=153064
>
> [url="http://www.thecodecage.com"]Microsoft Office Help[/url]
>
> .
>
From: Bob Barnes on
Sam - this helps. Thank you - Bob

"Sam Wilson" wrote:

> The following looks for an open workbook called test.xls, finds a sheet
> called "Sheet1" in it and colours cell A1 light blue. It can be placed in any
> other workbook & will still work:
>
> Sub demo()
>
> dim wb as workbook
> set wb = workbooks("test.xls")
>
> dim ws as worksheet
> set ws = wb.worksheets("Sheet1")
>
> ws.range("A1").interior.colorindex = 37
>
> end sub
>
> You can use activeworkbook etc rather than setting wb to a pre-named
> workbook etc.
>
> Sam
>
>
> "Bob Barnes" wrote:
>
> > Looking for automation code to have in a "Template" Workbook
> > that will run code in an Excel File received from Management.
> >
> > This code would make a DBF from the Excel File received from Management.
> >
> > TIA - Bob