Prev: If statements
Next: vba autosave
From: Villagio on 6 Apr 2010 16:05 DATE CODE DESCRIPTION OLD NEW UOM ------------- ------- ---------------------------------------- ----- ------ ------ 3/26/2010 *1438 ETHYL-2-METHYL BUTYRATE(E) 8.14 9.15 KG 4/6/2010 *0068 BENZYL BENZOATE(E)(I43) 5.00 6.00 KG How do I program in VBA to set the print area that the date field is today's date? Thanks. PC
From: Jim Thomlinson on 6 Apr 2010 17:13 Did you only want todays date or did you want everything up to todays date? What if there is more than one instance of todays date? What if they are not contiguious? -- HTH... Jim Thomlinson "Villagio" wrote: > DATE CODE DESCRIPTION OLD > NEW UOM > ------------- ------- ---------------------------------------- > ----- ------ ------ > 3/26/2010 *1438 ETHYL-2-METHYL BUTYRATE(E) 8.14 9.15 KG > 4/6/2010 *0068 BENZYL BENZOATE(E)(I43) 5.00 6.00 KG > > How do I program in VBA to set the print area that the date field is today's > date? Thanks. > > PC
From: Fred Smith on 6 Apr 2010 19:31 You probably want to use Data Filter. The VBA function for today's date is DATE. You will probably need to format it based on the formatting in your column. What I do to find the correct code is: -- turn on macro recording. -- turn on Data Filter -- filter the column, pick today's date -- turn off macro recording. Now I copy this code into my program, and edit it to use the DATE function. Regards, Fred "Villagio" <Villagio(a)discussions.microsoft.com> wrote in message news:387E3E34-60A9-43FA-9D12-03DBC5FFC483(a)microsoft.com... > DATE CODE DESCRIPTION OLD > NEW UOM > ------------- ------- ---------------------------------------- > ----- ------ ------ > 3/26/2010 *1438 ETHYL-2-METHYL BUTYRATE(E) 8.14 9.15 KG > 4/6/2010 *0068 BENZYL BENZOATE(E)(I43) 5.00 6.00 KG > > How do I program in VBA to set the print area that the date field is > today's > date? Thanks. > > PC
|
Pages: 1 Prev: If statements Next: vba autosave |