#1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 103
Default run time error 1004

Any one know what this could mean?
here is the code the produces it:
Sub o_three_panel_tot()
Application.ScreenUpdating = False
Sheets("o-bid").Select
Range("o_oak_slab_tot").Select
ActiveCell.FormulaR1C1 = "=SUM(o_threep_oak_slab)"
Range("o_raw_slab_tot").Select
ActiveCell.FormulaR1C1 = "=sum(o_threep_raw_slab)"
Range("o_maple_slab_tot").Select
ActiveCell.FormulaR1C1 = "=sum(o_threep_maple_slab)"
Range("o_pine_slab_tot").Select
ActiveCell.FormulaR1C1 = "=sum(o_threep_pine_slab)"
Range("o_alder_slab_tot").Select
ActiveCell.FormulaR1C1 = "=sum(o_threep_alder_slab)"
Range("o_cherry_slab_tot").Select
ActiveCell.FormulaR1C1 = "=sum(o_threep_cherry_slab)"
Sheets("o-builder").Select
End Sub

--
Message posted via OfficeKB.com
http://www.officekb.com/Uwe/Forums.a...excel/200702/1

  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 10,124
Default run time error 1004

TYPO?

What do your named ranges refer to? Individual cells or ranges? Also you do
NOT need or want selections.
with sheets("o-bid")
.Range("o_oak_slab_tot").Formula= "=SUM(o_threep_oak_slab)"
.Range("o_raw_slab_tot").Formula= "=sum(o_threep_raw_slab)"
'etc notice the . before range
end with

or, since they are named ranges, you may be able to just use this without
the With and no dots
sub doit()
Range("o_oak_slab_tot").Formula= "=SUM(o_threep_oak_slab)"
Range("o_raw_slab_tot").Formula= "=sum(o_threep_raw_slab)"
'etc
end sub

--
Don Guillett
SalesAid Software

"brownti via OfficeKB.com" <u31540@uwe wrote in message
news:6dcc31d59a58a@uwe...
Any one know what this could mean?
here is the code the produces it:
Sub o_three_panel_tot()
Application.ScreenUpdating = False
Sheets("o-bid").Select
Range("o_oak_slab_tot").Select
ActiveCell.FormulaR1C1 = "=SUM(o_threep_oak_slab)"
Range("o_raw_slab_tot").Select
ActiveCell.FormulaR1C1 = "=sum(o_threep_raw_slab)"
Range("o_maple_slab_tot").Select
ActiveCell.FormulaR1C1 = "=sum(o_threep_maple_slab)"
Range("o_pine_slab_tot").Select
ActiveCell.FormulaR1C1 = "=sum(o_threep_pine_slab)"
Range("o_alder_slab_tot").Select
ActiveCell.FormulaR1C1 = "=sum(o_threep_alder_slab)"
Range("o_cherry_slab_tot").Select
ActiveCell.FormulaR1C1 = "=sum(o_threep_cherry_slab)"
Sheets("o-builder").Select
End Sub

--
Message posted via OfficeKB.com
http://www.officekb.com/Uwe/Forums.a...excel/200702/1



  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 103
Default run time error 1004

the named ranges refer to a merged cell...i tried both things below and got
the same error. i first thought typo too, but cant seem to locate a typo.
I'll keep checking though. Well i tried moving the code to a different mod
and it works from there. i dont understand, but it works, so i'll leave it.
thanks,


Don Guillett wrote:
TYPO?

What do your named ranges refer to? Individual cells or ranges? Also you do
NOT need or want selections.
with sheets("o-bid")
.Range("o_oak_slab_tot").Formula= "=SUM(o_threep_oak_slab)"
.Range("o_raw_slab_tot").Formula= "=sum(o_threep_raw_slab)"
'etc notice the . before range
end with

or, since they are named ranges, you may be able to just use this without
the With and no dots
sub doit()
Range("o_oak_slab_tot").Formula= "=SUM(o_threep_oak_slab)"
Range("o_raw_slab_tot").Formula= "=sum(o_threep_raw_slab)"
'etc
end sub

Any one know what this could mean?
here is the code the produces it:

[quoted text clipped - 15 lines]
Sheets("o-builder").Select
End Sub


--
Message posted via OfficeKB.com
http://www.officekb.com/Uwe/Forums.a...excel/200702/1

  #5   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 103
Default run time error 1004

i know i should... :-/ I dont know where to begin to clean it up, and since
its working, I'm happy for the time being.


Don Guillett wrote:
You should still learn how to clean it up

the named ranges refer to a merged cell...i tried both things below and
got

[quoted text clipped - 29 lines]
Sheets("o-builder").Select
End Sub


--
Message posted via http://www.officekb.com



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
Run Time Error '1004' Carpie Excel Discussion (Misc queries) 3 June 5th 06 08:04 PM
Run time error 1004! steph00 Excel Discussion (Misc queries) 0 May 4th 06 05:45 PM
run time error 1004 johnw Excel Discussion (Misc queries) 0 November 16th 05 12:56 PM
Run-time error '1004 shternm Excel Discussion (Misc queries) 7 October 3rd 05 08:38 PM
Run time error 1004, General ODBC error [email protected] New Users to Excel 0 September 19th 05 02:41 AM


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