Hi this is my first time posting in here, and hopefully I am in the right place. I have an excel file that I use to track all my financial investments. The file is already set up with a query to retrieve stock prices when I refresh the document.
I would like to be able to open up the document, and store the closing price of the stock(s) with a date in the next column over. With this information I can graph weekly, monthly annually, or any time period I want.
I have been searching for a couple of hours now, and I could not find anything similar to this. I would think this is a pretty common idea for many people tracking their investments with Excel, so if it has been covered perhaps someone can point me in the right direction.
I don't have any programming experience in excel so as detailed of an explanation as possible would be much appreciated. Thanks in advance.
I have a file titled FP Skill by 15 min_12345678.XLS. Howeve each day
the _12345678 part of the file name changes.
I wuold like to open that file and copy some cells out of it with a
macro. The one below works fine if I have the excat name of the file in
it, but I would like it to just open any file LIKE FP Skill by 15
min_*.XLS. The astrick does not work for me.
Sub GetFPSkillby15()
Workbooks.Open Filename:= _
"FP Skill by 15 min_*.XLS"
Rows("1:65").Select
Selection.Copy
Windows("David of Chart Daily-FP 08-10-06.xls").Activate
Range("A26").Select
Selection.PasteSpecial Paste:=xlPasteAll, Operation:=xlNone,
SkipBlanks:= _
False, Transpose:=True
Sheets("Data Input").Select
End Sub
Any ideas.
Both files are located in the same folder.
David
Hello,
I am trying to create a macro that will modify a specific line within a .prodxml file (for use with Vismockup for viewing CAD data) and then save the resulting code as a new file.
I have been unable to perform this action within Excel and export the file because the file I am trying to edit has more than 65000 rows of data.
I would like the macro to...
1) Look in directory C:\Temp\ for "1104D_HIGH_LEVEL_EBOM_HAZELL.plmxml"
2) Open this file and search for the row that begins with text
ProductRevisionView id="id10" and replace it with the contents of a specific cell in my spreadsheet i.e. NewCode = Sheets("XML").Cells(6, 2) which will take the form "
ProductRevisionView id="id10" name="1104D_TOP_LEVEL_EBOM_HAZELL/A (view)" instanceRefs="id17 id2748 id4550 id5715 id6727 id8034"
The row to be replaced will always be the same i.e. I am using the file as a template, but the row contains 500+ id numbers within the instanceRefs argument. ProductRevisionView id="id10" only appears on one row.
3) Save the modified file as "ListNumber".prodxml (in C:\Temp) where ListNumber = Sheets("Front end WIP").Cells(6, 2)
Hopefully someone with the knowhow to do this can write the basic structure and I can finesse it afterwards.
Many thanks in advance,
Alan Hazell
Morning all.
I have a spreadsheet that runs a couple of macro's to produce a report in one of the sheets contained in the file.
what i want to be able to do is to take this final report, copy the sheet and then paste it into a new excel file. I would ideally also like to be able to have this file automatically save with a specific naming convention, possbilly containing the date the file was created e.g. testreport03may2011.xls to a certain location on my PC, say the "c:\" drive for example.
Can anyone help please?
Thanks
is it possible to copy one sheet in a workbook onto a new workbook then save it but not open the file?
I know i can open, save then close all in vba, but is there a way to do it in the background?
my current code looks like this
Code:
BidFile = Workbooks("Bid Sheet Creator").Sheets("Bid Sheet").Rows(3).Columns(2)
Application.CutCopyMode = False
Sheets("Bid Sheet").Copy
ActiveSheet.Name = BidFile
So i am copying my "Bid Sheet" to a new file and giving it a name. I have code below this saving the file then closing it but i am wondering if there is a way to change my above code to do it all in the background?
Thanks in advance
Hi,
I have been working on a file that has many little bugs and I reached a point where I simply want to re-do this file in order for it to work properly and not to give me various of random errors at times.
I am packing up on donuts and coffee and will have a long night in front of me but have couple of questions for anyone that has done such a process before.
First is - what can I bring over from the old file - can I at least paste as values some cells that are text only? Can I copy directly the password and paste in the cells? I don't want to bring any sort of bugs and will re-do as much as I have to.
Second - about the macro code - I will recreate the forms, but is it safe to copy and paste the code from the old file?
Thanks in advance!
Hello,
I'm trying to use a macro to copy and save an Excel file from one directory to another. I can do it but only if I open the file first and then Save As...
Thanks!
I am working on a project that saves Excel files with a variable name (File_Name) to designated folder. I need to also need to save a backup file to a separate designated folder with out overwriting the original file. I have tried SaveCopyAs but it keeps overwriting the original file. Help!! The code I am using to save the file is listed below.
Sub SaveAs()
'
' SaveAs Macro using a name from a cell and a set file path
'
If Range("File_Name") = "" Then
MsgBox "Please Enter The Required Information"
Exit Sub
End If
fname = Range("File_Name").Value
fileSaveName = Application.GetSaveAsFilename(InitialFileName:=FilePath" & fname, _
FileFilter:="Excel Workbook (*.xls), *.xls")
If fileSaveName <> False Then
On Error GoTo errhandler
ActiveWorkbook.SaveAs fileSaveName
MsgBox "The Manual Dispatch has been saved."
End If
Exit Sub
errhandler: MsgBox "THE FILE HAS NOT BEEN SAVED !", , "WARNING"
End Sub