LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
Jim Jim is offline
external usenet poster
 
Posts: 615
Default VBA Code Error

I'm having trouble with the following code, it gets stuck at
"sh.Range("Summary_Gross")." What I am trying to do is change the format of
cells, which works fine, but instead of naming cells I would like to name
ranges.

Sheets("Contract Data").Select
Range("C7").Select
ActiveCell.FormulaR1C1 = "$"
Range("G4:G34").NumberFormat = _
"[$$-409] #,##0.00;[Red]-([$$-409] #,##0.00)"
Range("C13:C14").NumberFormat = _
"[$$-409] #,##0.00;[Red]-([$$-409] #,##0.00)"
Range("C20").NumberFormat = _
"[$$-409] #,##0.00;[Red]-([$$-409] #,##0.00)"
sh.Range("Summary_Gross").NumberFormat = _
"[$$-409] #,##0.00;[Red]-([$$-409] #,##0.00)"
sh.Range("Summary_Rate").NumberFormat = _
"[$$-409] #,##0.00;[Red]-([$$-409] #,##0.00)"
sh.Range("Summary_Prev").NumberFormat = _
"[$$-409] #,##0.00;[Red]-([$$-409] #,##0.00)"
sh.Range("Adj_Gross").NumberFormat = _
"[$$-409] #,##0.00;[Red]-([$$-409] #,##0.00)"
sh.Range("Adj_Rate").NumberFormat = _
"[$$-409] #,##0.00;[Red]-([$$-409] #,##0.00)"
sh.Range("Adj_Prev").NumberFormat = _
"[$$-409] #,##0.00;[Red]-([$$-409] #,##0.00)"
sh.Range("K108:K105").NumberFormat = _
"[$$-409] #,##0.00;[Red]-([$$-409] #,##0."
sh.Range("I67").NumberFormat = _
"[$$-409] #,##0.00;[Red]-([$$-409] #,##0."
sh.Range("D12:D13").NumberFormat = _
"[$$-409] #,##0.00;[Red]-([$$-409] #,##0."
sh.Range("K16").NumberFormat = _
"[$$-409] #,##0.00;[Red]-([$$-409] #,##0."


Suggestions?

JIM
 
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
Protect Sheet with code, but then code will not Paste error. How do i get around this. Please read for explainations.... Corey Excel Programming 4 November 25th 06 04:57 AM
OnTime code error "can't execute code in break mode" tskogstrom Excel Programming 1 September 8th 06 10:29 AM
Error in Excel VBA Code (Error 91) dailem Excel Programming 1 August 25th 06 03:45 PM
How can I still go to the error-code after a On Error Goto? Michel[_3_] Excel Programming 2 May 4th 04 04:21 AM
Code Error - Run Time Error 5 (Disable Cut, Copy & Paste) Tim[_36_] Excel Programming 4 April 23rd 04 02:53 AM


All times are GMT +1. The time now is 01:37 AM.

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"