Re: $$Excel-Macros$$ Macro that will leave data and new data from query when ran

2013-08-12 Thread Lalit Mohan Pandey
Can you share your file and database so that we can check. On Monday, 12 August 2013 22:03:35 UTC+5:30, christy palmer wrote: > > Thank you for all your help. I really appreciate it. The macro is still > over writing the data in the spreadsheet :-( I swear I've tried everything. > I think i'm ju

Re: $$Excel-Macros$$ Macro that will leave data and new data from query when ran

2013-08-12 Thread christy palmer
Thank you for all your help. I really appreciate it. The macro is still over writing the data in the spreadsheet :-( I swear I've tried everything. I think i'm just over it now :-( On Fri, Aug 9, 2013 at 8:42 PM, Anoop K Sharma wrote: > Hey, > > Use the Attached one... I can see the code written

Re: $$Excel-Macros$$ Macro that will leave data and new data from query when ran

2013-08-09 Thread Anoop K Sharma
Hey, Use the Attached one... I can see the code written here a little bit slow... it can be made faster if I could get your database structure... Thanks, Anoop Sr. Developer On 8/9/13, Lalit Mohan Pandey wrote: > Replace line > > *Erow = Me.Range(A1).End(xlDown).row + 1* > > with this one > > *

Re: $$Excel-Macros$$ Macro that will leave data and new data from query when ran

2013-08-09 Thread Lalit Mohan Pandey
Replace line *Erow = Me.Range(A1).End(xlDown).row + 1* with this one *If LenB(Trim(Me.Cells(13, 2).Value)) = 0 Then Me.Cells(13, 2).Value = "DATES"* *Erow = Me.Cells(Me.Rows.Count, 2).End(xlUp).Offset(1).row* If it will not work then you need to share your database as well so that we can run

Re: $$Excel-Macros$$ Macro that will leave data and new data from query when ran

2013-08-07 Thread Anoop K Sharma
Replace your code with below one... This will be great if you could provide your original file. Dim state As String Dim startdate As String Dim enddate As String, Erow as long Sub btn1_click() state = Me.Cells(3, 3) startdate = Me.Cells(4, 3) enddate = Me.Cells(5, 3) MsgBox