Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5
Default Set volumnwidth and other parameters borders...

This is what I have currently and it is working fine. The
only thing I want to add is some coluymnwidth and borders
after I paste some values in the 2003.xls = year(NOW)
& ".xls" inside the new worksheet 13-10-2003 = worksheet
(Date(NOW))

Sub Open_MyFile()
Dim MyDate, MyValues
Application.ScreenUpdating = False
Sheets("Prices ARGO").Activate
MyDate = Now
Application.Workbooks.Open ("C:\Prices\" & Year
(MyDate) & ".xls")
Dim ShName As String
Dim nChr As Integer
ShName = CStr(Date)
For nChr = 1 To Len(ShName)
If Mid(ShName, nChr, 1) = "/" Then Mid(ShName,
nChr, 1) = "-"
Next
Set Wks = Worksheets.Add(After:=Worksheets
(Worksheets.Count))
With Wks
.Name = ShName
Workbooks("Workbook2").Worksheets("Prices ARGO").Range
("A1:G15").Copy
.Range("A1:A1").VALUE = Selection.PasteSpecial
(Paste:=xlPasteValues, Operation:=xlNone,
SkipBlanks:=False, Transpose:=False)
Workbooks(Year(Now) & ".xls").Save
Workbooks(Year(Now) & ".xls").Close
Sheets("Intro").Activate
MsgBox "" & Day(Now) & "'s prices have been saved
inside " & Year(Now) & ".xls"
End With
Application.ScreenUpdating = True
End Sub


Can you please help me out I have tried so many different
ways and notrhing seems to be the right approach

Thanks for your help
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Set volumnwidth and other parameters borders...

Workbooks("Workbook2.xls").Worksheets( _
"Prices ARGO").Range("A1:G15").Copy

..Range("A1").PasteSpecial _
Paste:=xlPasteValues, Operation:=xlNone, _
SkipBlanks:=False, Transpose:=False

--
Regards,
Tom Ogilvy

Antonis wrote in message
...
This is what I have currently and it is working fine. The
only thing I want to add is some coluymnwidth and borders
after I paste some values in the 2003.xls = year(NOW)
& ".xls" inside the new worksheet 13-10-2003 = worksheet
(Date(NOW))

Sub Open_MyFile()
Dim MyDate, MyValues
Application.ScreenUpdating = False
Sheets("Prices ARGO").Activate
MyDate = Now
Application.Workbooks.Open ("C:\Prices\" & Year
(MyDate) & ".xls")
Dim ShName As String
Dim nChr As Integer
ShName = CStr(Date)
For nChr = 1 To Len(ShName)
If Mid(ShName, nChr, 1) = "/" Then Mid(ShName,
nChr, 1) = "-"
Next
Set Wks = Worksheets.Add(After:=Worksheets
(Worksheets.Count))
With Wks
.Name = ShName
Workbooks("Workbook2").Worksheets("Prices ARGO").Range
("A1:G15").Copy
.Range("A1:A1").VALUE = Selection.PasteSpecial
(Paste:=xlPasteValues, Operation:=xlNone,
SkipBlanks:=False, Transpose:=False)
Workbooks(Year(Now) & ".xls").Save
Workbooks(Year(Now) & ".xls").Close
Sheets("Intro").Activate
MsgBox "" & Day(Now) & "'s prices have been saved
inside " & Year(Now) & ".xls"
End With
Application.ScreenUpdating = True
End Sub


Can you please help me out I have tried so many different
ways and notrhing seems to be the right approach

Thanks for your help



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
parameters DavidC Excel Discussion (Misc queries) 3 October 12th 09 06:48 PM
Too few parameters Laebrye Excel Discussion (Misc queries) 1 May 26th 09 11:56 AM
SQL & Like Parameters George Applegate[_2_] Excel Discussion (Misc queries) 2 November 2nd 07 06:11 PM
Too few parameters lou sanderson Excel Discussion (Misc queries) 1 January 13th 06 06:35 PM
too few parameters lou sanderson Excel Discussion (Misc queries) 1 December 14th 05 07:53 PM


All times are GMT +1. The time now is 10:53 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"