Re: $$Excel-Macros$$ Save As today date

2012-01-20 Thread NOORAIN ANSARI
Dear Darwin, It is working fine on my system, we can use below code in this format for dynamic path.. Sub savemethod() Dim todaydate As String Dim fileSaveName As String Path = VBA.InputBox("Enter Path") todaydate = VBA.Format(DateSerial(Year(Date), Month(Date), Day(Date)), "dd-mmm-") fileSav

Re: $$Excel-Macros$$ Save As today date

2012-01-19 Thread Vishwamitra Mishra
Try this: Below Code will popup an input box for you to enter the path of the file and name and then it will automatically append the todays name and save it as your given location. - ThisWorkbook.SaveAs InputBox("Enter the Path") & Day(Now) & "-" & Month(N

Re: $$Excel-Macros$$ Save As today date

2012-01-19 Thread Darwin Chan
Dear Noorain, I have found some method. See if there needs improvement. **Code** Sub savemethod2() Dim todaydate As String, fileSaveName As String, driveloc As String, mth As String mth = Format(Date, "mm") todaydate = VBA.Format(DateSerial(Year(Date), mo

Re: $$Excel-Macros$$ Save As today date

2012-01-19 Thread Darwin Chan
Dear Noorain, I try to use the code pasted here, however, run time error 1004. It may be due to the code highlight in red. What should the code be if I would like to have directory highlighted in red to be chosen by user? 2012/1/20 NOORAIN ANSARI > Dear Darwin, > > Your code is working fine, bu

Re: $$Excel-Macros$$ Save As today date

2012-01-19 Thread NOORAIN ANSARI
Dear Darwin, Your code is working fine, but need small correction... Please use below code... Sub savemethod() Dim todaydate As String Dim fileSaveName As String todaydate = VBA.Format(DateSerial(Year(Date), Month(Date), Day(Date)), "dd-mmm-") fileSaveName = Application.GetSaveAsFilename(

$$Excel-Macros$$ Save As today date

2012-01-19 Thread Darwin Chan
Dear group, I have written a macro for auto saving as today date excel file, however, when i save this, it refuses to save. I think that it turns DateSerial(Year(Date), Month(Date), Day(Date)) to be 20/01/2012, however, it treats me to create directory. What functions should I use to auto savin