Home |
Search |
Today's Posts |
|
#1
![]() |
|||
|
|||
![]()
Hi, I'am interested in creating Macros for some job tasks of mine. I went
through the Excel course of "Working with Loops" in Macros and have attained some basic information on VBA. But since I'am not an expert in it, I want to create Excel macros, using the Option " RECORD MACRO" in excel. My problem is that, I want the MACRO to (a) Copy data from 2 files into a new file. (b) Analyze this data with calculations (c) Build a graph.......basically the summary sheet and graph in a new sheet of the new file. I want to know, whether, can we do such a macro using "RECORD" feature? But I did try. I was stuck when I had to open 2 different files........I want the MAcro to prompt MssageBox as " Open the Last Month File" and.....then " Open the current month file" and so on..............But this is somehow not possible without VBA scripting........but I have learnt how to insert a Message Box, using "MsgBox" command. But this box should have a space to browse and select the files......which I'am not aware of how to do it........Can you kindly help me out by suggesting me on the above, point by point ...of how I should be able to do it? And also if possible suggest me the link in MS Ofice Online to a course on Macros that will help me gain knowledge on the above ? |
#2
![]() |
|||
|
|||
![]()
Too many questions in there.
I suggest you record a macro that does the basic job, open file 1, open file 2, merge the data, graph it. Then break it down into its separate parts, and decide which bits you want changed. If you have difficulty, post again with a specific question, details, and code. -- HTH RP (remove nothere from the email address if mailing direct) "Venkataraman.P.E" wrote in message ... Hi, I'am interested in creating Macros for some job tasks of mine. I went through the Excel course of "Working with Loops" in Macros and have attained some basic information on VBA. But since I'am not an expert in it, I want to create Excel macros, using the Option " RECORD MACRO" in excel. My problem is that, I want the MACRO to (a) Copy data from 2 files into a new file. (b) Analyze this data with calculations (c) Build a graph.......basically the summary sheet and graph in a new sheet of the new file. I want to know, whether, can we do such a macro using "RECORD" feature? But I did try. I was stuck when I had to open 2 different files........I want the MAcro to prompt MssageBox as " Open the Last Month File" and.....then " Open the current month file" and so on..............But this is somehow not possible without VBA scripting........but I have learnt how to insert a Message Box, using "MsgBox" command. But this box should have a space to browse and select the files......which I'am not aware of how to do it........Can you kindly help me out by suggesting me on the above, point by point ...of how I should be able to do it? And also if possible suggest me the link in MS Ofice Online to a course on Macros that will help me gain knowledge on the above ? |
#3
![]() |
|||
|
|||
![]()
Hi PE,
The macro recorder is an extremely useful tool it requires additional editing work to covert this into efficient code or code that can be reused more widely. I would make two suggestions: (1) See David McRitchie's maco introduction notes at: http://www.mvps.org/dmcritchie/excel/getstarted.htm Although some of the material will be familiar to you, there there are links to tutorials and other development sorces. (2) Now is a very appropriate time to purchase a good book. If you do a Google groups search for "Books" you will find many suggestions. Popular suggestions for an an intermdiate book preponderantly include those written by John Walkenbach. If you visit John Walkenbach's site at: http://www.j-walk.com/ss/excel/tips/index.htm you can use his Excel Books page. If you investigate the site you will discover a veritable treasure trove for the aspiring Excel expert to devour. As a starting point, investigate the Excel Books, Excel Links and the Excel Help Resources pages, ........but I have learnt how to insert a Message Box, using "MsgBox" command. But this box should have a space to browse and select the files...... which I'am not aware of how to do it........ Try something like: Sub Tester() Dim myFileName As Variant Dim WB As Workbook myFileName = Application.GetOpenFilename("Excel Files, *.xls") If myFileName = False Then Exit Sub End If Set WB = Workbooks.Open(Filename:=myFileName) End Sub --- Regards, Norman "Venkataraman.P.E" wrote in message ... Hi, I'am interested in creating Macros for some job tasks of mine. I went through the Excel course of "Working with Loops" in Macros and have attained some basic information on VBA. But since I'am not an expert in it, I want to create Excel macros, using the Option " RECORD MACRO" in excel. My problem is that, I want the MACRO to (a) Copy data from 2 files into a new file. (b) Analyze this data with calculations (c) Build a graph.......basically the summary sheet and graph in a new sheet of the new file. I want to know, whether, can we do such a macro using "RECORD" feature? But I did try. I was stuck when I had to open 2 different files........I want the MAcro to prompt MssageBox as " Open the Last Month File" and.....then " Open the current month file" and so on..............But this is somehow not possible without VBA scripting........but I have learnt how to insert a Message Box, using "MsgBox" command. But this box should have a space to browse and select the files......which I'am not aware of how to do it........Can you kindly help me out by suggesting me on the above, point by point ...of how I should be able to do it? And also if possible suggest me the link in MS Ofice Online to a course on Macros that will help me gain knowledge on the above ? |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Record new macro ghosted | Excel Discussion (Misc queries) | |||
multiple text files URGENT | Excel Discussion (Misc queries) | |||
importing multiple text files??? | Excel Discussion (Misc queries) | |||
Record Macro Relative does not work? | Excel Discussion (Misc queries) | |||
Record Macro Relative does not work? | Excel Discussion (Misc queries) |