Macro too export data minus functions .

Sunline

Well-known Member
Joined
Oct 6, 2007
Messages
701
Office Version
  1. 2016
Platform
  1. Windows
Hello all , i am building a w/book (Book1) which has 170,000 rows and growing weekly .
In this workbook (sheet1) there are functions , i want to export the entire sheet from A1 too KZ170,000 .
Is there anyway of doing this without having to have the same functions too accept what comes from export data into Book2 , sheet1 .
Currently having to export to Access and back but time consuming .
Using 2007 version . Just wondering if theres any easier way .
Thanks .
 
Are you still getting an error ??
I think you are doing something wrong with the sheet names
where is the error line now ??

The code works fine for me, so if it's not an obvious error, send me a PM and I'll give you my e-Mail address.
If the data isn't sensitive, you can send me a copy of the workbook and I'll take a closer look.
 
Upvote 0

Excel Facts

Do you hate GETPIVOTDATA?
Prevent GETPIVOTDATA. Select inside a PivotTable. In the Analyze tab of the ribbon, open the dropown next to Options and turn it off
Try this, it works OK for me.
I noticed you were missing a quotation mark in the file name
Code:
Private Sub sendsheet() 'EXPORT MASTER SHEET TO NEW WORKBOOK
Application.ScreenUpdating = False
Worksheets.Add.Move after:=Worksheets(Worksheets.Count)
ActiveSheet.Name = "1A MAINSHEET 30 BACK VALUES" 'change sheet name to suit
Sheets("Sheet1").Cells.Copy

THIS AREA BELOW IS HIGHLIGHTING IN YELLOW SO AM GUESSING A PROBLEM . 

Sheets("1A MAINSHEET 30 BACK VALUES").Cells.PasteSpecial Paste:=xlPasteFormats
Cells.PasteSpecial Paste:=xlPasteValuesAndNumberFormats
Worksheets("1A MAINSHEET 30 BACK VALUES").SaveAs "C:\Documents and Settings\kevin russell watt\My Documents\" & "1A MAINSHEET 30 BACK VALUES" ' change path and filename to suit
Application.ScreenUpdating = True
MsgBox "Master Sheet Successfully Exported to C:\Temp"
End Sub
 
Upvote 0
It worked this time , my golly i have been stressing , thought id have to cut and paste 170,000 rows . Did the lot in one go .
Thankyou for hanging in there for me .
I have looked all over here and web for basic export but everyone elses always has a curly bit extra they want .
Thanks again Michael for your patience and help .
 
Upvote 0
My pleasure, thanks for the feedback.
Something to keep in mind is that Syntax is "REALLY" important in writing VBA.
The tiniest error in adding a comma, quotation mark, spelling etc......can drive you nuts trying to find and rectify.
Cheers
 
Upvote 0

Forum statistics

Threads
1,224,578
Messages
6,179,654
Members
452,934
Latest member
mm1t1

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top