ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   NEED HELP WITH LOOP ! (https://www.excelbanter.com/excel-programming/287892-re-need-help-loop.html)

flex zax

NEED HELP WITH LOOP !
 

Tony-
You are a super-genius !! Thank U!!!
I have a 3 questions about your code-

1. If I wanted it to calculate the data for last month instead. How do I
modify the Month(Now()) in the line

... If Month(ActiveCell) = Month(Now())...?
I tried
If Month(ActiveCell) = MONTH(DATE(YEAR(NOW()),MONTH(NOW()),0))...
but it gave me a compile error.

2. Second, is there a way to add code to a VBA code to dictate how slow
or fast it can run?

3. Can you please briefly comment your code for me so I can understand
what's going on better? I am a beginner. Also, is there a VBA textbook
you would recommend that I purchase to help me?

Thanks.
~Flex~

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!


All times are GMT +1. The time now is 08:03 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com