Excel Question

T

TG

Is it possible to run a excel program as excel opens but run it in the
background so you can't see it?

I am trying to use the lookup command using another work book and also using
a dropdown menu in the cell.

Thanks-Tom
 
D

Dave Peterson

Via a macro???

You can turn application.screenupdating to false, but if you can't see the
screen, how would you use a dropdown.

I guess I don't understand the question...
 
T

TG

I want to have a file running in the background for "Materials". In the
materials.xls file it would have the specific gravity for example.

Then in a new file called "quoting template", I could drop down a menu using
validation list or the lookup fuction t select the material.

When I use a macro, I close the file and open it, (security settings on
medium), it asks to enable macros. I hit yes. However in my quoting template
the drop down menu doesn't work until I actually run the macro for materials
list.

So if I had it running when I started Excel, I wouldn't have to use a macro
then?

I hope this helps explain what I am trying to do.

Thanks,
Tom
 
D

Dave Peterson

You can hide the windows that allow you to see the workbook in excel.

Open excel
Open the file
window|hide window (in xl2003 menus)
close excel
Answer yes to the "do you want to save your changes" prompt

Next time you open that file, you won't see it. To make changes, you'll have to
show the window, make the changes, hide the window, and save that workbook.

======
I'm not sure what you're doing, but you could have a macro in the quoting
template that opens the Materials workbook, runs the macro you want, and closes
the materials workbook.

This goes in the ThisWorkbook module of the quoting workbook:

Option Explicit
Private Sub Workbook_Open()

Dim myFileName As String
Dim MacName As String
Dim wkbk As Workbook

myFileName = "C:\my documents\excel\materials.xls"

MacName = "MyMacroNameHere"

Set wkbk = Workbooks.Open(Filename:=myFileName, ReadOnly:=True)

Application.Run "'" & wkbk.Name & "'!" & MacName

wkbk.Close savechanges:=False

End Sub

Untested, but compiled.

And no error checking at all within the macro. You'll want to add some.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top