Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 8
Default inserting a worksheet using visual basic

Inserting a worksheet from another workbook the links remain.

I would like to inset a worksheet and bring accross the values rather than
the formulas.
This is the macro:
Sub Balance_Sheet_Data()

Application.ScreenUpdating = False
Workbooks.Open Filename:="G:\Balance Sheet 2004.xls"
Cells.Select
Selection.Copy
Windows("DATA SOURCE - GOLF # 3-01.xls").Activate
Sheets("Balance Sheet Recon Data").Select
Range("A1").Select
ActiveSheet.Paste
Application.CutCopyMode = False
Windows("Balance Sheet 2004.xls").Activate
ActiveWorkbook.Close
Sheets("Command Page").Select
Range("A1").Select
Application.ScreenUpdating = True
End Subs

What visual basic command do I change?





  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,123
Default inserting a worksheet using visual basic

Hi F.C

You can use this to make values of all formulas after you paste it

With ActiveSheet.UsedRange
.Value = .Value
End With



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


"F.C" wrote in message ...
Inserting a worksheet from another workbook the links remain.

I would like to inset a worksheet and bring accross the values rather than
the formulas.
This is the macro:
Sub Balance_Sheet_Data()

Application.ScreenUpdating = False
Workbooks.Open Filename:="G:\Balance Sheet 2004.xls"
Cells.Select
Selection.Copy
Windows("DATA SOURCE - GOLF # 3-01.xls").Activate
Sheets("Balance Sheet Recon Data").Select
Range("A1").Select
ActiveSheet.Paste
Application.CutCopyMode = False
Windows("Balance Sheet 2004.xls").Activate
ActiveWorkbook.Close
Sheets("Command Page").Select
Range("A1").Select
Application.ScreenUpdating = True
End Subs

What visual basic command do I change?







  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default inserting a worksheet using visual basic


F.C Wrote:
Inserting a worksheet from another workbook the links remain.

I would like to inset a worksheet and bring accross the values rathe
than
the formulas.
This is the macro:
Sub Balance_Sheet_Data()

Application.ScreenUpdating = False
Workbooks.Open Filename:="G:\Balance Sheet 2004.xls"
Cells.Select
Selection.Copy
Windows("DATA SOURCE - GOLF # 3-01.xls").Activate
Sheets("Balance Sheet Recon Data").Select
Range("A1").Select
ActiveSheet.Paste
Application.CutCopyMode = False
Windows("Balance Sheet 2004.xls").Activate
ActiveWorkbook.Close
Sheets("Command Page").Select
Range("A1").Select
Application.ScreenUpdating = True
End Subs

What visual basic command do I change?


Hi F.C

Try changing Paste to

PasteSpecial Paste:=xlValues, Operation:=xlNone, SkipBlanks:= _
False, Transpose:=Fals

--
Paul Sheppar

-----------------------------------------------------------------------
Paul Sheppard's Profile: http://www.excelforum.com/member.php...fo&userid=2478
View this thread: http://www.excelforum.com/showthread.php?threadid=39980

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 8
Default inserting a worksheet using visual basic

Thank You Ron
Greatly appreciated

Ended up using the following
ActiveSheet.Paste
ActiveSheet.UsedRange.Value = ActiveSheet.UsedRange.Value


"Ron de Bruin" wrote:

Hi F.C

You can use this to make values of all formulas after you paste it

With ActiveSheet.UsedRange
.Value = .Value
End With



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


"F.C" wrote in message ...
Inserting a worksheet from another workbook the links remain.

I would like to inset a worksheet and bring accross the values rather than
the formulas.
This is the macro:
Sub Balance_Sheet_Data()

Application.ScreenUpdating = False
Workbooks.Open Filename:="G:\Balance Sheet 2004.xls"
Cells.Select
Selection.Copy
Windows("DATA SOURCE - GOLF # 3-01.xls").Activate
Sheets("Balance Sheet Recon Data").Select
Range("A1").Select
ActiveSheet.Paste
Application.CutCopyMode = False
Windows("Balance Sheet 2004.xls").Activate
ActiveWorkbook.Close
Sheets("Command Page").Select
Range("A1").Select
Application.ScreenUpdating = True
End Subs

What visual basic command do I change?








  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 8
Default inserting a worksheet using visual basic

Thank you Paul

I had a number of replies ended up using the following:


ActiveSheet.Paste
ActiveSheet.UsedRange.Value = ActiveSheet.UsedRange.Value

Thank You
Frank

"Paul Sheppard" wrote:


F.C Wrote:
Inserting a worksheet from another workbook the links remain.

I would like to inset a worksheet and bring accross the values rather
than
the formulas.
This is the macro:
Sub Balance_Sheet_Data()

Application.ScreenUpdating = False
Workbooks.Open Filename:="G:\Balance Sheet 2004.xls"
Cells.Select
Selection.Copy
Windows("DATA SOURCE - GOLF # 3-01.xls").Activate
Sheets("Balance Sheet Recon Data").Select
Range("A1").Select
ActiveSheet.Paste
Application.CutCopyMode = False
Windows("Balance Sheet 2004.xls").Activate
ActiveWorkbook.Close
Sheets("Command Page").Select
Range("A1").Select
Application.ScreenUpdating = True
End Subs

What visual basic command do I change?


Hi F.C

Try changing Paste to

PasteSpecial Paste:=xlValues, Operation:=xlNone, SkipBlanks:= _
False, Transpose:=False


--
Paul Sheppard


------------------------------------------------------------------------
Paul Sheppard's Profile: http://www.excelforum.com/member.php...o&userid=24783
View this thread: http://www.excelforum.com/showthread...hreadid=399805


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
Are there any NON-Visual Basic solutions for inserting a picture based a derived or called filename? The Great Attractor Excel Worksheet Functions 7 May 27th 07 04:38 AM
Worksheet naming using visual basic O'C Excel Worksheet Functions 2 October 31st 06 05:30 PM
visual basic command identify a worksheet in a workbook F.C Excel Programming 2 August 29th 05 02:58 AM
inserting subtotal() function in spreadsheet via Visual Basic/macro darrelstickler Excel Programming 3 February 26th 04 09:01 PM
Saving Workbook in Visual Basic Hides the Worksheet, Why bmartin52 Excel Programming 0 January 10th 04 06:33 PM


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