LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 163
Default Excel help please, Button to export data

Below is the code to export the data from 3 worksheets to an external sheet.

This works perfect, however i am going to be needing to alter this code on a
weekly basis as sheets are constantly being added.

The question i have is, can i make my own excel worksheet and allow the user
to type in the new name of the worksheet to export?

For example:

column A
EAM676
EAM788
EAM872
EAM338

When the button is pressed the data is exported to the external sheet?

Would love an answer to this and would be much appreciated.

Neil.

Dim wb1 As Workbook, wb2 As Workbook
Dim ws As Worksheet, lngRow As Long

Application.DisplayAlerts = False
Application.ScreenUpdating = False
Set wb1 = ActiveWorkbook
Set wb2 = Workbooks.Open("\\sguk-app1\Business Objects\CHR\Export of
SGUK.xls")
Set ws = wb2.Sheets("Sheet1")

lngRow = ws.Cells(Rows.Count, "A").End(xlUp).Row
wb1.Sheets("EAM605").Range("A8:T27").Copy ws.Range("A" & lngRow)
lngRow = ws.Cells(Rows.Count, "A").End(xlUp).Row
wb1.Sheets("EGC613").Range("A8:T27").Copy ws.Range("A" & lngRow)
lngRow = ws.Cells(Rows.Count, "A").End(xlUp).Row
wb1.Sheets("ECP621").Range("A8:T27").Copy ws.Range("A" & lngRow)

wb2.Close True
Application.DisplayAlerts = True
Application.ScreenUpdating = True


 
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
Not able to export data from IE6,7 to MS Excel Jaman Excel Discussion (Misc queries) 0 December 8th 06 02:48 PM
Export custom Macro Button Images RWN Setting up and Configuration of Excel 1 November 26th 06 11:52 AM
Export custom Macro Button Images RWN Excel Discussion (Misc queries) 1 November 26th 06 10:53 AM
export data to Excel?? a b via OfficeKB.com Excel Discussion (Misc queries) 0 January 15th 05 03:08 PM
Can I export Excel data into another software? JZ Excel Discussion (Misc queries) 0 December 24th 04 01:15 PM


All times are GMT +1. The time now is 08:21 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"