It's better to attach the file and put you query there. No one gonna study this code as different people have different logic.
Regards, Anoop On Tue, Nov 20, 2012 at 1:49 AM, Natron <protoc...@gmail.com> wrote: > This is close and might get you a kickstart. > > Sub selectme() > '''''''''''''''''''''''''' > 'Original Script Written by www.ozgrid.com > '''''''''''''''''''''''''' > > Dim rRange As Range > Dim strCriteria As String, strCriteria2 As String > Dim lCol As Long > Dim rHeaderCol As Range > Dim xlCalc As XlCalculation > > On Error Resume Next > Step1: > Set rRange = Range("A1").CurrentRegion > > 'Cancelled or non valid rage > If rRange Is Nothing Then Exit Sub > 'Awlays use GoTo when selecting range so doesn't matter which > Worksheet > Application.Goto rRange.Rows(1), True > > step2: > lCol = 1 > 'Cancelled > If lCol = 0 Then Exit Sub > > Step3: > strCriteria = frmExport.txtStart > strCriteria2 = frmExport.txtEnd > > 'Store current Calculation then switch to manual. > 'Turn off events and screen updating > With Application > xlCalc = .Calculation > .Calculation = xlCalculationManual > .EnableEvents = False > .ScreenUpdating = False > End With > > > 'Remove any filters > ActiveSheet.AutoFilterMode = False > > With rRange 'Filter, offset(to exclude headers) > .AutoFilter Field:=lCol, Criteria1:=">=" & strCriteria, > Operator:=XlAutoFilterOperator.xlAnd, Criteria2:="<=" & strCriteria2 > .Offset(1, 0).SpecialCells(xlCellTypeVisible).EntireRow.Select > End With > > 'Remove any filters > 'ActiveSheet.AutoFilterMode = False > > 'Revert back > With Application > .Calculation = xlCalc > .EnableEvents = True > .ScreenUpdating = True > End With > On Error GoTo 0 > End Sub > > On Monday, November 19, 2012 1:55:03 PM UTC-5, Mangesh wrote: > >> Hi Friends, >> >> I have attached the file where I need to export specific range to another >> excel file which to be save on C: drive. >> >> I have created userform for this as well. >> >> Need vba code to perform this task. >> >> Waiting for the solution. >> >> Please help !!! >> >> -- >> With regards, >> >> *MaNgEsH* >> >> -- > Join official Facebook page of this forum @ > https://www.facebook.com/discussexcel > > FORUM RULES > > 1) Use concise, accurate thread titles. Poor thread titles, like Please > Help, Urgent, Need Help, Formula Problem, Code Problem, and Need Advice > will not get quick attention or may not be answered. > 2) Don't post a question in the thread of another member. > 3) Don't post questions regarding breaking or bypassing any security > measure. > 4) Acknowledge the responses you receive, good or bad. > 5) Jobs posting is not allowed. > 6) Sharing copyrighted material and their links is not allowed. > > NOTE : Don't ever post confidential data in a workbook. Forum owners and > members are not responsible for any loss. > --- > You received this message because you are subscribed to the Google Groups > "MS EXCEL AND VBA MACROS" group. > To post to this group, send email to excel-macros@googlegroups.com. > To unsubscribe from this group, send email to > excel-macros+unsubscr...@googlegroups.com. > Visit this group at http://groups.google.com/group/excel-macros?hl=en. > > > -- Regards, Anoop -- Join official Facebook page of this forum @ https://www.facebook.com/discussexcel FORUM RULES 1) Use concise, accurate thread titles. Poor thread titles, like Please Help, Urgent, Need Help, Formula Problem, Code Problem, and Need Advice will not get quick attention or may not be answered. 2) Don't post a question in the thread of another member. 3) Don't post questions regarding breaking or bypassing any security measure. 4) Acknowledge the responses you receive, good or bad. 5) Jobs posting is not allowed. 6) Sharing copyrighted material and their links is not allowed. NOTE : Don't ever post confidential data in a workbook. Forum owners and members are not responsible for any loss. --- You received this message because you are subscribed to the Google Groups "MS EXCEL AND VBA MACROS" group. To post to this group, send email to excel-macros@googlegroups.com. To unsubscribe from this group, send email to excel-macros+unsubscr...@googlegroups.com. Visit this group at http://groups.google.com/group/excel-macros?hl=en.