Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Populating a main and 'regional' sheets


This is a shortened version as it's rather repetitive. The key cells ar
B20:C20 as they contain the region name.


Code
-------------------
Sub macro1()
'
' macro1 Macro
' Macro recorded 21/04/2005 by Mike Cobb
'

'
If Sheet1.Range("C4").Value = vbNullString Then
MsgBox "******** Please fill in the PHC Number ********", vbCritical
Exit Sub
End If

If Sheet1.Range("H49").Value = vbNullString Then
MsgBox "******* The DOV Has Not Been Signed and Returned *******", vbCritical
Exit Sub
End If

Workbooks.Open FileName:= _
"\\wdb.local\burton\work\JML\REM\12345.xls"
Sheets("Division").Select
Range("A8").Select
Selection.EntireRow.Insert
Windows("Fastrac formmac.xls").Activate
Range("C4").Select
Selection.Copy
Windows("12345.xls").Activate
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
Windows("Fastrac formmac.xls").Activate
Range("F4:G4").Select
Application.CutCopyMode = False
Selection.Copy
Windows("12345.xls").Activate
Range("B8").Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
Range("C8").Select
Windows("Fastrac formmac.xls").Activate
Range("F6:G6").Select
Application.CutCopyMode = False
Selection.Copy
Windows("12345.xls").Activate
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
Range("D8").Select
Windows("Fastrac formmac.xls").Activate
Range("E11:F11").Select
Application.CutCopyMode = False
Selection.Copy
Windows("12345.xls").Activate
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
Range("E8").Select
Windows("Fastrac formmac.xls").Activate
Range("E14:F14").Select
Application.CutCopyMode = False
Selection.Copy
Windows("12345.xls").Activate
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
Range("F8").Select
Windows("Fastrac formmac.xls").Activate
Range("B14").Select
Application.CutCopyMode = False
Selection.Copy
Windows("12345.xls").Activate
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
Range("G8").Select
Windows("Fastrac formmac.xls").Activate
Range("B20:C20").Select
Application.CutCopyMode = False
Selection.Copy
Windows("12345.xls").Activate
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
Range("H8").Select
Windows("Fastrac formmac.xls").Activate
Range("E20:F20").Select
Application.CutCopyMode = False
Selection.Copy
Windows("12345.xls").Activate
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
Range("I8").Select

End Su
-------------------

--
M3Cob
-----------------------------------------------------------------------
M3Cobb's Profile: http://www.excelforum.com/member.php...fo&userid=2498
View this thread: http://www.excelforum.com/showthread.php?threadid=38517

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
how do i sum the same cell in numerous sheets behind a main njparamedic Excel Worksheet Functions 2 May 14th 09 02:27 PM
Auto Populating Fields from many worksheets to one main worksheet Vincent Excel Worksheet Functions 1 November 14th 08 05:18 PM
12 Sheets - Submit to One Main Spreadsheet Chris Excel Discussion (Misc queries) 2 July 10th 08 09:50 PM
Updating sheets in Workbook from main sheet IMS Lori Excel Discussion (Misc queries) 0 January 28th 08 07:11 PM
populating sheets based on data from parent sheets seve Excel Discussion (Misc queries) 2 January 15th 05 09:22 PM


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