Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Run Time Error 1004


Dear Friends,

I would like to show the filtered data in a combobox1. For this i am
using
the following codes.

Private sub userform_activate()

Dim tempws As Worksheet
Set tempws = ThisWorkbook.Worksheets.Add
tempws.Name = "Temp"
Sheets("code").Select
Range("a1:g1").Select
Selection.AutoFilter
Selection.AutoFilter
Selection.AutoFilter field:=4, criterial:="Cotton Suppliers"

Range("a1:b65531").Select
Selection.Copy
Sheets("temp").Select
Range("a1").Select
ActiveSheet.Paste

Sheets("temp").Activate

comboBox1.columnCount = 1
ComboBox1.RowSource = Range("b2", range("b2").end(Xldown)).address

End sub


But when i run it. It stops at

selection.AutoFilter field:=4, Criterial:="Cotton Suppliers"

with a message of run time error 1004.

How can i overcome the Problem. Further i would like to delete the
"Temp" Worksheet when close the userForm.

Thanks

Syed Haider Ali


--
Syed Haider Ali
------------------------------------------------------------------------
Syed Haider Ali's Profile: http://www.excelforum.com/member.php...o&userid=21994
View this thread: http://www.excelforum.com/showthread...hreadid=505415

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Run Time Error 1004


Is there any solution

--
Syed Haider Al
-----------------------------------------------------------------------
Syed Haider Ali's Profile: http://www.excelforum.com/member.php...fo&userid=2199
View this thread: http://www.excelforum.com/showthread.php?threadid=50541

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, General ODBC error [email protected] New Users to Excel 0 September 19th 05 01:41 AM
run-time error '1004': Application-defined or object-deifined error [email protected] Excel Programming 5 August 10th 05 09:39 PM
Run time error '1004': Generaol ODBC error Dwaine Horton[_3_] Excel Programming 2 April 26th 05 02:52 PM
Run time error 1004 General ODCB Error Kevin Excel Programming 3 February 26th 05 12:51 PM
Application Run Time Error 1004 and Stack Error ExcelMonkey[_190_] Excel Programming 9 February 11th 05 04:48 PM


All times are GMT +1. The time now is 10:09 PM.

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"