Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default copy & save desired data to a new file


hi!

i have a excel file called, all room bill from 1 to 6.xls, shee
contain date and as well as all button, which excute macros. they ar
on the O columns and i have data from A to N column so i want to sav
only those rowas and columns, which have data to a new file daily an
monthly basis,
there is no need of the insert button in daily and monthly excel file


can any one help me please.

for your reference i am giving following information, which should b
maintain in every daily and monthly files, which are creating durin
excution of code.

* row height is fixed to 41.25 pixel

* there is fixed title, which will print on the top of the everypage
everytime, which are in terms of row $1:$8

i have locked those button so they don't get printed during dat
printing.

if you need any more information please feel free to ask me.

i have already get help from bill and tom,

here is the combine code(running perfectly) which need to modificatio
to avoid copy macro buttons to new file.
------------------------
'this is for daily saving file with date

Application.DisplayAlerts = False

ActiveWorkbook.Save
fname1 = "RM-1 " & Format(Date, "dd-mm-yy") & ".xls"

ChDrive "D"
ChDir "D:\"
ActiveWorkbook.SaveAs Filename:=fname1, FileFormat:=xlWorkbookNormal
_
Password:="", WriteResPassword:="", ReadOnlyRecommended:=False, _
CreateBackup:=False

Workbooks.Open Filename:="\\SS\ss_d\HOTEL HOST INTL. ROOM BIL
FORMAT\ROOM BILLS FORMAT IN EXCEL\all room bill from 1 to 6.xls"
Sheets("RM-1").Select
ActiveWindow.WindowState = xlMaximized
Windows(fname1).Activate
ActiveWorkbook.Save
ActiveWorkbook.Close savechanges:=False

----------------------------------------

thanks in advance.

sujata

--
sujata_ghos
-----------------------------------------------------------------------
sujata_ghosh's Profile: http://www.excelforum.com/member.php...fo&userid=1643
View this thread: http://www.excelforum.com/showthread.php?threadid=27891

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 212
Default copy & save desired data to a new file

Hi Sujata,
Add following code just above "ActiveWorkBook.SaveAs FileName:- ......."

butCount = 1
Do While butCount <= ThisWorkbook.Sheets("Sheet1").Shapes.Count
Sheet1.Shapes(n).Delete
Loop

(Put the appropriate sheet name in place of "Sheet1")

BTW: If this Host International, Kolkata, I am a regular customer there.

Sharad

"sujata_ghosh" wrote in message
...

hi!

i have a excel file called, all room bill from 1 to 6.xls, sheet
contain date and as well as all button, which excute macros. they are
on the O columns and i have data from A to N column so i want to save
only those rowas and columns, which have data to a new file daily and
monthly basis,
there is no need of the insert button in daily and monthly excel file.


can any one help me please.

for your reference i am giving following information, which should be
maintain in every daily and monthly files, which are creating during
excution of code.

* row height is fixed to 41.25 pixel

* there is fixed title, which will print on the top of the everypage,
everytime, which are in terms of row $1:$8

i have locked those button so they don't get printed during data
printing.

if you need any more information please feel free to ask me.

i have already get help from bill and tom,

here is the combine code(running perfectly) which need to modification
to avoid copy macro buttons to new file.
------------------------
'this is for daily saving file with date

Application.DisplayAlerts = False

ActiveWorkbook.Save
fname1 = "RM-1 " & Format(Date, "dd-mm-yy") & ".xls"

ChDrive "D"
ChDir "D:\"
ActiveWorkbook.SaveAs Filename:=fname1, FileFormat:=xlWorkbookNormal,
_
Password:="", WriteResPassword:="", ReadOnlyRecommended:=False, _
CreateBackup:=False

Workbooks.Open Filename:="\\SS\ss_d\HOTEL HOST INTL. ROOM BILL
FORMAT\ROOM BILLS FORMAT IN EXCEL\all room bill from 1 to 6.xls"
Sheets("RM-1").Select
ActiveWindow.WindowState = xlMaximized
Windows(fname1).Activate
ActiveWorkbook.Save
ActiveWorkbook.Close savechanges:=False

----------------------------------------

thanks in advance.

sujata.


--
sujata_ghosh
------------------------------------------------------------------------
sujata_ghosh's Profile:
http://www.excelforum.com/member.php...o&userid=16432
View this thread: http://www.excelforum.com/showthread...hreadid=278917



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 212
Default copy & save desired data to a new file

For got to add one line.
The code should be

butCount = 1
Do While butCount <= ThisWorkbook.Sheets("Sheet1").Shapes.Count
Sheet1.Shapes(n).Delete
butCount = butCount + 1
Loop

Alternative code to above, without do loop:

Sheet1.Shapes.SelectAll
Selection.Delete

Sharad

"Sharad Naik" wrote in message
...
Hi Sujata,
Add following code just above "ActiveWorkBook.SaveAs FileName:- ......."

butCount = 1
Do While butCount <= ThisWorkbook.Sheets("Sheet1").Shapes.Count
Sheet1.Shapes(n).Delete
Loop

(Put the appropriate sheet name in place of "Sheet1")

BTW: If this Host International, Kolkata, I am a regular customer there.

Sharad

"sujata_ghosh" wrote in
message ...

hi!

i have a excel file called, all room bill from 1 to 6.xls, sheet
contain date and as well as all button, which excute macros. they are
on the O columns and i have data from A to N column so i want to save
only those rowas and columns, which have data to a new file daily and
monthly basis,
there is no need of the insert button in daily and monthly excel file.


can any one help me please.

for your reference i am giving following information, which should be
maintain in every daily and monthly files, which are creating during
excution of code.

* row height is fixed to 41.25 pixel

* there is fixed title, which will print on the top of the everypage,
everytime, which are in terms of row $1:$8

i have locked those button so they don't get printed during data
printing.

if you need any more information please feel free to ask me.

i have already get help from bill and tom,

here is the combine code(running perfectly) which need to modification
to avoid copy macro buttons to new file.
------------------------
'this is for daily saving file with date

Application.DisplayAlerts = False

ActiveWorkbook.Save
fname1 = "RM-1 " & Format(Date, "dd-mm-yy") & ".xls"

ChDrive "D"
ChDir "D:\"
ActiveWorkbook.SaveAs Filename:=fname1, FileFormat:=xlWorkbookNormal,
_
Password:="", WriteResPassword:="", ReadOnlyRecommended:=False, _
CreateBackup:=False

Workbooks.Open Filename:="\\SS\ss_d\HOTEL HOST INTL. ROOM BILL
FORMAT\ROOM BILLS FORMAT IN EXCEL\all room bill from 1 to 6.xls"
Sheets("RM-1").Select
ActiveWindow.WindowState = xlMaximized
Windows(fname1).Activate
ActiveWorkbook.Save
ActiveWorkbook.Close savechanges:=False

----------------------------------------

thanks in advance.

sujata.


--
sujata_ghosh
------------------------------------------------------------------------
sujata_ghosh's Profile:
http://www.excelforum.com/member.php...o&userid=16432
View this thread:
http://www.excelforum.com/showthread...hreadid=278917





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
Save File in Desired Location & Name Kam Excel Discussion (Misc queries) 2 December 8th 09 04:09 PM
.Copy Destination:= << Forget when PasteValues is desired Jim May Excel Discussion (Misc queries) 1 August 12th 07 07:34 PM
copy the same raws of all sheets from about a 100 file to a new sheet of a book and save the file [email protected] Setting up and Configuration of Excel 0 March 14th 07 02:13 AM
How to save a file without overwrite or save a copy? SettingChange Setting up and Configuration of Excel 1 November 3rd 05 02:10 AM
copy, paste and save file Hoob-n-Tam Excel Programming 4 November 15th 03 01:26 PM


All times are GMT +1. The time now is 05:08 AM.

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"