Translate

Total Pageviews

Conditional Compilation

 Conditional Compilation

In contrast to a normal If statement this condition to executed at compile time and only the appropriate branch is included.
As with other languages it is possible to create "debug" and "release" versions of your code.
You can also use the #Const directive to create other compiler variables.

#Const g_Conditional = 1 

You can define a constant in (Project Properties)(General tab) in the text field Conditional Compilation Arguments

In the program code you can then make use of the value of this constant with #IF statements.
There is no loss in speed of execution.

#If g_Conditional = 1 Then 

#Else

#EndIf

For example you may want to include extra message boxes, or use Debug.Print or Debug.Assert statements while you are developing and testing your code but don't want these incorporated when you distribute the code to the users.
Use the "#Const" directive to create a compiler variable. (#IF .THEN #ELSE #ELSEIF, #CONST).
Then use delimiter blocks using the compiler directive to include the extra blocks of code.
These are global in scope, ie they apply to the whole project.
The Option Compare statement does not affect expression in a #IF and #ELSEIF statements and these are always evaluated using Option Compare Text.


Keywords

Certain keywords cannot be used for your constants.
For example "debug" cannot be used.

#Const debug = 1 

With - End With

 With - End With

If you are going to perform several different actions on the same object use the With ....... End With.
This enables you to perform multiple operations on a single object.
After an object is assigned to a variable VBA can access it more quickly than it can a lengthy reference that has to be resolved.
The fewer the dots, the faster the processing time.
Another way to improve the speed is to use the With - End construct.

With Selection.Font 
   .Name = "Arial"
   .Size = 12
End With

link - docs.microsoft.com/en-us/dotnet/visual-basic/language-reference/statements/with-end-with-statement


Important

Using With-End can speed things up but it does make the code harder to debug as you can't quickly drag expressions into the Watch Window.

Comment in Access VBA

 

Rem Keyword

The apostrophe (') is the preferred comment indicator, although you can use the "Rem" keyword if you want.
This is a rollover from the BASIC days.
Until the apostrophe, the Rem keyword can only be written at the start of the line and not on the same line (after an instruction).

REM my comment 

Sanskrit Words

 Sanskrit Words - Yes

ह्यः

indecl.

hyaH

yesterday

भवतु!

expr.

bhavatu!

Yes

ह्यः सायम्

phrase

hyaH sAyam

yesterday evening

तिरो अह्न्य

adj.

tiro ahnya

prepared the day before yesterday

समाप्तप्रायम्

sent.

samAptaprAyam

Yes, finished for all practical purposes.

आम्, तत् सत्यम्

expr.

Am, tat satyam

Yes,that is right.

परह्यः रात्रौ

phrase

parahyaH rAtrau

the day before yesterday at night

आम्, अहम् कुशली.

sentence

Am, aham kuzalI.

Yes, I am fine.

आम् गृह्णामि ।

sent.

Am gRhNAmi

Yes, I take.

आम् गृह्णामि ।

sent.

Am gRhNAmi

Yes, I take.

आम् , कुशली अस्मि |

sent.

Am , kuzalI asmi |

Yes, I(m) am fine.

आम्, सर्वं कुशलम्

sent.

Am, sarvaM kuzalam

Yes, everything is all right.

ह्यः अहं गृहे आसम्

sent.

hyaH ahaM gRhe Asam

Yesterday I was at home.

आम् , इदं कीदृशम् ?

sent.

Am , idaM kIdRzam ?

Yes, how is it?

ह्यः त्वम् अपठः ?

sentence

hyaH tvam apaThaH ?

Did you read yesterday ?

आम् , सर्वे कुशलिनः

sentence

Am , sarve kuzalinaH

Yes, all are fine.

ह्यः तु स्वस्थः आसीत्

sent.

hyaH tu svasthaH AsIt

He was all right yesterday.

ह्यः भवतीं स्मृतवान्

sent.

hyaH bhavatIM smRtavAn

Yesterday I(mas.) remembered you(fem.).

ह्यः त्वं कुत्र आसीः ?

sent.

hyaH tvaM kutra AsIH ?

Where were you yesterday ?

आम्, सा अध्यापिका अस्ति |

sent.

Am, sA adhyApikA asti |

Yes, she is a teacher.

आम्, अहम् अमेरिकदेशीयः

sent.

Am, aham amerikadezIyaH

Yes, I am an American.

ह्यः भवन्तं स्मृतवान्

sent.

hyaH bhavantaM smRtavAn

I(mas.) remembered you(mas.) yesterday.

आम्, इदम् बहु प्रसिद्धम्

sent.

Am, idam bahu prasiddham

Yes, this is very well known.

अस्तु, परिवेषणं करोमि

sent.

astu, pariveSaNaM karomi

Yes, I am going to serve in a minute.

अस्तु, एकक्षणं तिष्ठतु

sent.

astu, ekakSaNaM tiSThatu

Yes, wait a minute, please.

ह्यः इड्डरिका अलभ्यत |

sent.

hyaH iDDarikA alabhyata |

Idli was available yesterday.

आम्, तानि फलानि पक्वानि.

sent.

Am, tAni phalAni pakvAni.

Yes, those fruits are ripe.

भवतु, चिन्तां न करोतु

sent.

bhavatu, cintAM na karotu

Yes, don't bother.

परह्यः एव दृष्टवान् अहम्

sent.

parahyaH eva dRSTavAn aham

I saw it the day before yesterday.

आम्, इदम् अधिकं प्रसिद्धम्

sent.

Am, idam adhikaM prasiddham

Yes, this is very famous.

ह्यः फलितांशः प्रकटितः

sent.

hyaH phalitAMzaH prakaTitaH

The result was announced yesterday.

ह्यः एव गिरीशः स्वीकृतवान्

sent.

hyaH eva girIzaH svIkRtavAn

Girish borrowed it yesterday.

आम् , अयं प्रकोष्ठः मदीयः

sent.

Am , ayaM prakoSThaH madIyaH

Yes, this room is mine.

आम्, गोपालः मम सहाध्यायी |

sent.

Am, gopAlaH mama sahAdhyAyI |

Yes, Gopala is my classmate.

ह्यः दिवा दशवादनात् पूर्वं न

phrase

hyaH divA dazavAdanAt pUrvaM na

yesterday not before 10 a.m.

ह्यः कियत् पर्यन्तं पाठितवान्?

sent.

hyaH kiyat paryantaM pAThitavAn?

Where did we stop yesterday?

परह्यः सः स्नातुमेव न शक्तवान्

sent.

parahyaH saH snAtumeva na zaktavAn

Day before yesterday he could not even take a shower

ह्यः बालिकाः सन्देशम् पठितवत्यः

sent.

hyaH bAlikAH sandezam paThitavatyaH

The girls read the message yesterday.

आम् केनापि अभियंत्रा सह सा परिणीता |

sent.

Am kenApi abhiyaMtrA saha sA pariNItA |

Yes, she is married to some engineer.

ह्यः स्पर्धायां के जयं प्राप्तवन्तः ?

sent.

hyaH spardhAyAM ke jayaM prAptavantaH ?

Who won the match yesterday?

ह्यः सा भोजनपेटिकां शालां न नीतवती

sent.

hyaH sA bhojanapeTikAM zAlAM na nItavatI

Yesterday she did not take her lunch box to school

ह्यस्तनं व्यञ्जनं कियत् रुचिकरं आसीत्!

sent.

hyastanaM vyaJjanaM kiyat rucikaraM AsIt!

How tasty was yesterday's dry curry!

आम् तस्य पुत्रः मम मातुल; यः अधिवक्ता |

sent.

Am tasya putraH mama mAtula; yaH adhivaktA |

Yes, his son is my maternal uncle, who is an advocate.

आम् तानि आनीय भवत्याः कपाटिकायां स्थापितवान्

sent.

Am tAni AnIya bhavatyAH kapATikAyAM sthApitavAn

Yes, I brought and kept them in your wardrobe.

ह्यः रजकापणतः भवान् मम वस्त्राणि आनीतवान् वा ?

sent.

hyaH rajakApaNataH bhavAn mama vastrANi AnItavAn vA ?

Did you bring my clothes from the dry cleaners yesterday?

आम् सोस्पि परिणीतः।मम मातुलानि चिकित्सिका अस्ति ।

Am sospi pariNItaHmama mAtulAni cikitsikA asti

Yes, he is also married and my maternal aunt is a doctor .

आम् वयं चेम्स्फोर्द् नगरे अमरिका-देशे वसामः न तु आङ्लदेशे

sent.

Am vayaM cemsphord nagare amarikA-deze vasAmaH na tu AGladeze

Yes, we live in Chelmsford in the US, not in [Chelmsford,] England.

आम् ते घाटकोपरे निवसन्ति यत्र मम मातामहस्य आपणः वर्तते ।

Am te ghATakopare nivasanti yatra mama mAtAmahasya ApaNaH vartate

Yes, they live at Ghatkopar where my maternal grandfather runs a shop .

आम् प्रक्षालयामि हस्तौ धावनपात्र्यां तथा शोषयामि लघुना प्रोंछेन् ।

Am prakSAlayAmi hastau dhAvanapAtryAM tathA zoSayAmi laghunA proMchen

Yes sir, I wash my hands in the wash-basin and then use a small towel .

आं महाशय, अस्माकं गृहे चुल्लीश्रेणी, निपीड-पक्त्रं, प्रशीतकस्तथा मिश्रण-पेषणयन्त्रं च वर्तते ।

AM mahAzaya, asmAkaM gRhe cullIzreNI, nipIDa-paktraM, prazItakastathA mizraNa-peSaNayantraM ca vartate

Yes sir, we have a cooking range , one pressure-cooker , a fridge and a mixer-grinder .

Sanskrit Vowels and Consonants

Sanskrit Vowels and Consonants 


a

aa,A

i

ii,I

u

uu,U

R

RR

लृ lR

lRR

e

ai

o

au

अं aM

अः aH

ka

kha

ga

gha

Ga

ca

cha

ja

jha

Ja

Ta

Tha

Da

Dha

Na

ta

tha

da

dha

na

pa

pha

ba

bha

ma

ya

ra

la

va

क्ष kSa

za,sha

Sa,shha

sa

ha

'a

ज्ञ jJa