LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 90
Default code broken

I have the following code but it is not pasting and i am not sure why, can
anyone help please. Also In the file cells i am copying from there is a
defined list, will this be updated when in the new file when i paste?

Thank you

Sub UpdateDensities()
'Copy this section changing fluid database name for open and close,

' Open the database.
Workbooks.Open "G:\Drilling Fluids Technology\Fluids
Database\FluidDatabaseTemplate.xls"

'Unlock folder denstities page
Windows("FluidDatabaseTemplate.xls").Activate
Sheets("Densities").Select
ActiveSheet.Unprotect Password:="baker"

'Copy and Paste Section

Windows("FluidDatabaseTemplate.xls").Activate
Columns("H:M").Select
Selection.EntireColumn.Hidden = False

Windows("FluidDatabaseMM.xls").Activate
Sheets("Densities").Select
Columns("A:M").Select
Selection.Copy

Windows("FluidDatabaseTemplate.xls").Activate
Columns("A:M").Select
Selection.pasteSpecial Paste:=xlPasteAll, Operation:=xlNone,
SkipBlanks:= _
False, Transpose:=False

Columns("H:M").Select
Selection.EntireColumn.Hidden = True

Windows("FluidDatabaseTemplate.xls").Activate
Sheets("Densities").Select
ActiveSheet.Protect Password:="baker"

Windows("FluidDatabaseMM.xls").Activate
Sheets("Extras").Select

'Close Workbook
Application.DisplayAlerts = False
Workbooks("FluidDatabaseTemplate.xls").Close
Application.DisplayAlerts = True

End Sub
 
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
Trouble with code that is broken over multiple lines (space_) mr tom Excel Programming 4 January 8th 08 11:36 AM
Hyperlinks broken Roger[_3_] Excel Discussion (Misc queries) 2 August 20th 07 02:30 AM
Broken Limks Minitman Excel Worksheet Functions 2 December 4th 05 04:01 AM
i think its broken littlemcl Excel Discussion (Misc queries) 1 October 7th 05 01:29 PM
Broken References Gareth[_3_] Excel Programming 1 February 21st 04 04:29 PM


All times are GMT +1. The time now is 06:46 AM.

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"