ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Generalized Macro (https://www.excelbanter.com/excel-programming/358158-generalized-macro.html)

sassycat8

Generalized Macro
 
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

PY & Associates

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





All times are GMT +1. The time now is 07:43 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com