View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
PY & Associates PY & Associates is offline
external usenet poster
 
Posts: 145
Default Generalized Macro

1, outside loop each file
inside loop each cell in column of your choice
do your stuff
next cell
next file

2, record a macro
put it in a loop also

"sassycat8" wrote in message
...
Hello,
I am very new to programming, I am a scientist by education.I have 2
questions:

1) I am trying to write a macro to do a simple calculation and make a

graph
from two column of data. I have successfully recorded a macro for one set

of
data. I need to repeat this process amny times. There will be many text

files
that will contain the same columns, I want to macro to work on each, no
matter how long the columns are. I am trying to figure out how to

generalize
the range variable so that someone can press a button after opening the

text
file and get the graph in question.

2) I am also trying to find a way to easily import these text files into
Excel. If I right-click and open with...Excel, they open perfectly for

what I
am trying to do, but if I open from inside Excel, I have to go through the
whole import menu. Can I create a form for importing that would open from

a
button a menu for choosing the file and then open the file without the

whole
import wizard?

Thank you for any advice,
Rebecca