Need Help on this project
Hi all,
I'm new in this forum and I sign up as i believe the guys here can help me with the problem on macro that I have.
Well firstly I need to write a macro that prompt me to select a file so that I can use that selected file data to calculate the average, max , min and standard deviation.
I have no idea how to go about doing it. I have tried putting the functions of the average, max, min and standard deviation to the worksheet but it only allows me to get data from fixed location when I run macro.
Hope someone can help me with this.
Thanks very much.
;)
Best regards
tkl
Re: Need Help on this project
Welcome to the Forums.
Sounds like this is being done in Excel?
You can use the GetOpenFileName method to present the Open File Dialog box.
VB Code:
Application.GetOpenFilename FileFilter:="Excel Workbooks Only (*.xls),*.xls", FilterIndex:=1, Title:="Select Excel Workbook", MultiSelect:=False
Re: Need Help on this project
HI Moderator,
THanks for the reply. Yes you are right. It's use in the excel however I'm not very good at it in executing a macro to do the above mentioned task. Maybe you can help me with this?
So after I choose my file, how can I write micro so that It can transfer the data to another fixed file where i can use for calculations?
THanks very much.
Re: Need Help on this project
Here is how you can select a sheet and copy/paste it into another already opened workbook.
VB Code:
Application.Workbooks("Book1").Sheets("Sheet1").Select
Application.Workbooks("Book1").Sheets("Sheet1").Copy After:=Application.Workbooks("Book2").Sheets(3)