hi,

Sub test()
icount = Len(ThisWorkbook.Name)
icount = icount - 4
strtest = Left(ThisWorkbook.Name, icount)

ThisWorkbook.SaveAs (ThisWorkbook.Path & "\" & strtest & " " & Format
(Date, "dd-mmm-yyyy") & ".xls")
End Sub

with Regards
Bala

On May 27, 5:17 pm, Dhartikumar Sahu <dhartiku...@gmail.com> wrote:
> hi bala
> can u suggest me for saving the file
>  i want to save as file name with current date.
>
> can u give me a VBA Code please
>
>
>
> On Wed, May 27, 2009 at 2:13 PM, bala <bal...@gmail.com> wrote:
>
> > Hi,
> >              Try this code
>
> > Range("A1").select
>
> > while Activecell.value <> ""
> > if len(Activecell.value) >3 then
> >   Activecell.offset(0,1).value = Activecell.value
> > else
> >  Activecell.offset(0,1).value =  0 & Activecell.value
>
> > end if
> > Activecell.offset(1,0).select
> > wend
>
> > Regards
> > Bala
>
> > On May 27, 6:01 am, Rick <rjmag...@gmail.com> wrote:
> > > I have code below to put a list of ID's from this:
> > > 123
> > > 122
> > > 121
> > > 3532
>
> > > to this:  ('0123','0122','0121','03532')
>
> > > However, I only want to put a zero in front of the ID if it is 3
> > > characters in lenght. Desired output would be
> > > ('0123','0122','0121','3532'). Any help would be appreciated.
>
> > > thanks,
>
> > > Public Sub Create_LIST()
>
> > > Range("A1").Select
> > > Range(Selection, Selection.End(xlDown)).Select
>
> > > For Each vCell In Selection.Cells
>
> > > If vSQL = "" Then
> > > vSQL = vCell
> > > Else
> > > vSQL = vSQL & "','0" & vCell
> > > End If
>
> > > Next vCell
>
> > > Range("B1").Select
> > > Range("B1").Value = "('0" & vSQL & "')"
> > > Selection.Copy
>
> > > End Sub- Hide quoted text -
>
> - Show quoted text -

--~--~---------~--~----~------------~-------~--~----~
-------------------------------------------------------------------------------------
Some important links for excel users:
1. Excel and VBA Tutorials(Video and Text), Free add-ins downloads at 
http://www.excelitems.com
2. Excel tutorials at http://www.excel-macros.blogspot.com
3. Learn VBA Macros at http://www.vbamacros.blogspot.com
4. Excel Tips and Tricks at http://exceldailytip.blogspot.com
 

To post to this group, send email to excel-macros@googlegroups.com
If you find any spam message in the group, please send an email to:
Ayush Jain  @ jainayus...@gmail.com or
Ashish Jain @ 26may.1...@gmail.com
-------------------------------------------------------------------------------------
-~----------~----~----~----~------~----~------~--~---

Reply via email to