Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 06-01-2012, 01:28 PM
Colin Legg's Avatar
Colin Legg Colin Legg is offline runtime error 1004 Windows 7 32bit runtime error 1004 Office 2010 32bit
Expert
 
Join Date: Jan 2011
Location: UK
Posts: 369
Colin Legg will become famous soon enough
Default

That's an odd one. I used google and I found this thread. So, using the suggestion there:
Code:
            With .Sort
                .SortFields.Add _
                     Key:=fRange, _
                     SortOn:=xlSortOnValues, _
                     Order:=xlAscending, _
                     DataOption:=xlSortNormal
                 .SetRange sRange
                 .Header = xlGuess
                 .MatchCase = False
                 .Orientation = xlTopToBottom
                 .SortMethod = xlPinYin
                 Application.Calculate
                 .Apply
                 .SortFields.Clear
            End With
The person that had the problem on the other thread said this version failed on the first run, but after that it worked fine.
Reply With Quote
  #2  
Old 06-03-2012, 07:05 AM
gbaker gbaker is offline runtime error 1004 Windows 7 32bit runtime error 1004 Office 2010 32bit
Competent Performer
runtime error 1004
 
Join Date: May 2012
Posts: 111
gbaker is on a distinguished road
Default Runtime 1004

Hi Colin,
I tried the new code a couple times and still get and error.
Stops at:
Code:
.SortFields.Add _
                     Key:=fRange, _
                     SortOn:=xlSortOnValues, _
                     Order:=xlAscending, _
                     DataOption:=xlSortNormal
Thanks
Reply With Quote
Reply



Similar Threads
Thread Thread Starter Forum Replies Last Post
runtime error 1004 Open Word w Excel & fill Word textboxes w info from Excel fields runtime error 4248 Joe Patrick Word VBA 2 01-30-2012 07:23 AM
runtime error 1004 Runtime Error 4120 in Word 2007 macro Frankwlc Word 5 11-28-2011 01:54 AM
runtime error 1004 Runtime error 91 waldux Word VBA 1 03-04-2011 11:25 PM
Runtime error 5487 - Word cannot complete the save to to file permission error franferns Word 0 11-25-2009 05:35 AM
Installing Access Runtime ziggy0508 Office 1 09-29-2005 04:21 PM

Other Forums: Access Forums

All times are GMT -7. The time now is 03:56 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft