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


Hi guys! I have a problem here. I have completed a form in Excel that
allows users to input data and make selection on popup calendars and
dropdown list. All the data entered or selected will be input into
another worksheet on the same file. Now I need to save whatever data
that I obtained from the form into a new Excel file. Is there a way for
me to do this by writing a macro, so that all my users have to do is to
click on a 'submit' button i created for them?

Advance thansk to all who are kind enough to read my post and many
thanks to those who are able to help. I have been pressured by my
manager for days...

:(


--
Spartanz
------------------------------------------------------------------------
Spartanz's Profile: http://www.excelforum.com/member.php...o&userid=28830
View this thread: http://www.excelforum.com/showthread...hreadid=485785

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,123
Default Using Macro to save data in new excel file

You can use Activesheet.copy to create a new workbook with only that sheet

Try this example that Save the new file in C:\

Sub test()
Dim wb As Workbook
Dim strdate As String
strdate = Format(Now, "dd-mm-yy h-mm-ss")
Application.ScreenUpdating = False
ActiveSheet.Copy
Set wb = ActiveWorkbook
With wb
.SaveAs "C:\Part of " & ThisWorkbook.Name _
& " " & strdate & ".xls"
.Close False
End With
Application.ScreenUpdating = True
End Sub


--
Regards Ron de Bruin
http://www.rondebruin.nl


"Spartanz" wrote in message
...

Hi guys! I have a problem here. I have completed a form in Excel that
allows users to input data and make selection on popup calendars and
dropdown list. All the data entered or selected will be input into
another worksheet on the same file. Now I need to save whatever data
that I obtained from the form into a new Excel file. Is there a way for
me to do this by writing a macro, so that all my users have to do is to
click on a 'submit' button i created for them?

Advance thansk to all who are kind enough to read my post and many
thanks to those who are able to help. I have been pressured by my
manager for days...

:(


--
Spartanz
------------------------------------------------------------------------
Spartanz's Profile: http://www.excelforum.com/member.php...o&userid=28830
View this thread: http://www.excelforum.com/showthread...hreadid=485785



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Using Macro to save data in new excel file


Hi Ron, thanks for the reply. If I am not wrong, this method you stated
will copy the entire worksheet into a new workbook. Am I right to say
so? I think I did not specified out clearly in my above post. I am
sorry for this.

Actually, I need to gather the data entered in the form, and save it
onto a new file, with the data stored into another table i created.
Something like if I write an application out using Java, then
afterwhich I use sql to save the fields' information onto an Access
database that I created. With java, sql and Access I am able to do so.
But Excel here uses macro which is wrote using VB, which i am not as
familiar with. Thus I wonder if there is a way for me to append/save
the worksheet information onto another worksheet, and not the whole
form along.

Once again, Ron, thanks for your previous help. At least now I learnt
how to copy the whole sheet out. Something new to me. :)


Ron de Bruin Wrote:
You can use Activesheet.copy to create a new workbook with only that
sheet

Try this example that Save the new file in C:\

Sub test()
Dim wb As Workbook
Dim strdate As String
strdate = Format(Now, "dd-mm-yy h-mm-ss")
Application.ScreenUpdating = False
ActiveSheet.Copy
Set wb = ActiveWorkbook
With wb
.SaveAs "C:\Part of " & ThisWorkbook.Name _
& " " & strdate & ".xls"
.Close False
End With
Application.ScreenUpdating = True
End Sub


--
Regards Ron de Bruin
http://www.rondebruin.nl


"Spartanz" wrote
in message
...

Hi guys! I have a problem here. I have completed a form in Excel

that
allows users to input data and make selection on popup calendars and
dropdown list. All the data entered or selected will be input into
another worksheet on the same file. Now I need to save whatever data
that I obtained from the form into a new Excel file. Is there a way

for
me to do this by writing a macro, so that all my users have to do is

to
click on a 'submit' button i created for them?

Advance thansk to all who are kind enough to read my post and many
thanks to those who are able to help. I have been pressured by my
manager for days...

:(


--
Spartanz

------------------------------------------------------------------------
Spartanz's Profile:

http://www.excelforum.com/member.php...o&userid=28830
View this thread:

http://www.excelforum.com/showthread...hreadid=485785



--
Spartanz
------------------------------------------------------------------------
Spartanz's Profile: http://www.excelforum.com/member.php...o&userid=28830
View this thread: http://www.excelforum.com/showthread...hreadid=485785

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,123
Default Using Macro to save data in new excel file

Do you mean like a database
http://www.rondebruin.nl/copy1.htm

If you use a row below your form with links to the cells(you can hide that row)
in A50 =c10 and in B50 g20 ........

You can copy a range like A50:Z50 to the database sheet


--
Regards Ron de Bruin
http://www.rondebruin.nl


"Spartanz" wrote in message
...

Hi Ron, thanks for the reply. If I am not wrong, this method you stated
will copy the entire worksheet into a new workbook. Am I right to say
so? I think I did not specified out clearly in my above post. I am
sorry for this.

Actually, I need to gather the data entered in the form, and save it
onto a new file, with the data stored into another table i created.
Something like if I write an application out using Java, then
afterwhich I use sql to save the fields' information onto an Access
database that I created. With java, sql and Access I am able to do so.
But Excel here uses macro which is wrote using VB, which i am not as
familiar with. Thus I wonder if there is a way for me to append/save
the worksheet information onto another worksheet, and not the whole
form along.

Once again, Ron, thanks for your previous help. At least now I learnt
how to copy the whole sheet out. Something new to me. :)


Ron de Bruin Wrote:
You can use Activesheet.copy to create a new workbook with only that
sheet

Try this example that Save the new file in C:\

Sub test()
Dim wb As Workbook
Dim strdate As String
strdate = Format(Now, "dd-mm-yy h-mm-ss")
Application.ScreenUpdating = False
ActiveSheet.Copy
Set wb = ActiveWorkbook
With wb
.SaveAs "C:\Part of " & ThisWorkbook.Name _
& " " & strdate & ".xls"
.Close False
End With
Application.ScreenUpdating = True
End Sub


--
Regards Ron de Bruin
http://www.rondebruin.nl


"Spartanz" wrote
in message
...

Hi guys! I have a problem here. I have completed a form in Excel

that
allows users to input data and make selection on popup calendars and
dropdown list. All the data entered or selected will be input into
another worksheet on the same file. Now I need to save whatever data
that I obtained from the form into a new Excel file. Is there a way

for
me to do this by writing a macro, so that all my users have to do is

to
click on a 'submit' button i created for them?

Advance thansk to all who are kind enough to read my post and many
thanks to those who are able to help. I have been pressured by my
manager for days...

:(


--
Spartanz

------------------------------------------------------------------------
Spartanz's Profile:

http://www.excelforum.com/member.php...o&userid=28830
View this thread:

http://www.excelforum.com/showthread...hreadid=485785



--
Spartanz
------------------------------------------------------------------------
Spartanz's Profile: http://www.excelforum.com/member.php...o&userid=28830
View this thread: http://www.excelforum.com/showthread...hreadid=485785



  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Using Macro to save data in new excel file


Hi Ron, that link you gave me is so cool. It is able to save the whole
row from sheet1 to sheet2 right? Is it possible to save from sheet1 of
workbook1 to sheet1 of workbook2? different workbook instead of the
same workbook. this is because database and the form are 2 different
files. Thanks

Ron de Bruin Wrote:
Do you mean like a database
http://www.rondebruin.nl/copy1.htm

If you use a row below your form with links to the cells(you can hide
that row)
in A50 =c10 and in B50 g20 ........

You can copy a range like A50:Z50 to the database sheet


--
Regards Ron de Bruin
http://www.rondebruin.nl


[/color]


--
Spartanz
------------------------------------------------------------------------
Spartanz's Profile: http://www.excelforum.com/member.php...o&userid=28830
View this thread: http://www.excelforum.com/showthread...hreadid=485785



  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,123
Default Using Macro to save data in new excel file

See the last link on that page
http://www.rondebruin.nl/copy1.htm#workbook

--
Regards Ron de Bruin
http://www.rondebruin.nl


"Spartanz" wrote in message
...

Hi Ron, that link you gave me is so cool. It is able to save the whole
row from sheet1 to sheet2 right? Is it possible to save from sheet1 of
workbook1 to sheet1 of workbook2? different workbook instead of the
same workbook. this is because database and the form are 2 different
files. Thanks

Ron de Bruin Wrote:
Do you mean like a database
http://www.rondebruin.nl/copy1.htm

If you use a row below your form with links to the cells(you can hide
that row)
in A50 =c10 and in B50 g20 ........

You can copy a range like A50:Z50 to the database sheet


--
Regards Ron de Bruin
http://www.rondebruin.nl





--
Spartanz
------------------------------------------------------------------------
Spartanz's Profile: http://www.excelforum.com/member.php...o&userid=28830
View this thread: http://www.excelforum.com/showthread...hreadid=485785
[/color]


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
macro to save as a data input by user file name from a designated Brian Excel Discussion (Misc queries) 2 November 20th 07 04:00 AM
internet connection via excel macro at timed intervels & save data to excel file. Sam Excel Worksheet Functions 1 July 22nd 07 06:08 AM
Macro to save Excel file maperalia Excel Programming 2 September 4th 05 09:17 PM
ASP: Open Excel File with Macro, Allow Macro to run, and then save delgados129 Excel Programming 0 March 10th 05 09:35 PM
Macro to save excel file jc lewis Excel Programming 1 June 25th 04 12:52 AM


All times are GMT +1. The time now is 07:24 PM.

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

About Us

"It's about Microsoft Excel"