Steffan McMains
About
-
Posted Questions
No Question(s) posted yet!
Posted Answers
Answer
Dim Count Dim List Dim Address
I didn’t study his code, because the way he declared his variables made his code hard to understand. In fact, his problem probably was caused by the way he handled his variables.
So let’s see what he should have done…
By default, Excel doesn’t force you to declare your variables. However, you should change that setting immediately.
In any version of Excel, press Alt+F11 to launch the Visual Basic Editor (VBE). Choose Tools, Options. In the Editor tab of the Options dialog, make sure that there’s a check mark in front of “Require Variable Declaration.”
After you choose OK, insert a new Module. When you do so, you’ll see Option Explicit as the first line of the module. This line tells Excel that all variables must be declared.
To declare a variable, type Dim, the variable name, and the variable type…somewhat like this…
…or this…
If you don’t specify the type of variable, as shown in the first example at the top of this post, VBA declares the variable as a Variant type. A Variant can accept any type of variable.
In rare instances you’ll have a good reason for using a Variant. But about 95% of the time, you should use explicit variable types. One reason for doing so is that your code will run faster. But the primary reason is that you’ll reduce your coding errors, for at least two reasons.
The first reason you’ll reduce coding errors is that Excel enforces the type of variable you specify. To illustrate, if you run this macro…
…Excel launches an error dialog, because an Integer data type can’t contain text. (However, Excel will accept a statement like…
…because “99” can be expressed as text.)
The second reason that it’s always a good idea to declare your variable types explicitly is that it helps to document your intentions when you write code. This documentation is critical if you look at your code after several weeks have passed. Knowing whether a variable was intended to contain a number or text can make it much easier for you to read your old code, find errors, and then continue coding.
For this reason, when you do need to declare a variable as Variant, do it explicitly, like this:
By always declaring your Variants explicitly, you’ll always know that you intended to use a Variant, rather than doing so as an oversight.
Charles Simonyi, a Hungarian programmer at Xerox PARC in the 1970s, who later became Chief Architect at Microsoft, proposed that variable names use a prefix that tells something about the variable. According to Wikipedia, there are two versions of what has become known as Hungarian Notation.
The version that is the easiest to use, and that I find the most useful, is to use the prefix to specify the data type of the variable. Here, for example, I use “n” to specify an integer, “rng” to specify a range, and “s” to specify a string.
Answer is posted for the following question.
Vba when to declare variables?
Answer
History:
In May 1963, 32 Heads of independent African States met in Addis Ababa Ethiopia to sign the Charter creating Africa’s first post-independence continental institution, The Organisation of African Unity (OAU). The OAU was the manifestation of the pan-African vision for an Africa that was united, free and in control of its own destiny and this was solemnised in the OAU Charter in which the founding fathers recognised that freedom, equality, justice and dignity were essential objectives for the achievement of the legitimate aspirations of the African peoples and that there was a need to promote understanding among Africa’s peoples and foster cooperation among African states in response to the aspirations of Africans for brother-hood and solidarity, in a larger unity transcending ethnic and national Differences. The guiding philosophy was that of Pan-Africanism which centred on African socialism and promoted African unity, the communal characteristic and practices of African communities, and a drive to embrace Africa’s culture and common heritage.
Read the speeches from the 1st OAU Summit in 1963
The main objectives of the OAU were to rid the continent of the remaining vestiges of colonisation and apartheid; to promote unity and solidarity amongst African States; to coordinate and intensify cooperation for development; to safeguard the sovereignty and territorial integrity of Member States and to promote international cooperation. The OAU Charter spelled out the purpose of the Organisation namely:
Through the OAU Coordinating Committee for the Liberation of Africa, the Continent worked and spoke as one with undivided determination in forging an international consensus in support of the liberation struggle and the fight against apartheid. The OAU had provided an effective forum that enabled all Member States to adopt coordinated positions on matters of common concern to the continent in international fora and defend the interests of Africa effectively.
On 9.9.1999, the Heads of State and Government of the Organisation of African Unity (OAU) issued the Sirte Declaration calling for the establishment of an African Union, with a view, to accelerating the process of integration in the continent to enable Africa to play its rightful role in the global economy while addressing multifaceted social, economic and political problems compounded as they were by certain negative aspects of globalisation.
The launch of the African Union:
The African Union (AU) was officially launched in July 2002 in Durban, South Africa, following a decision in September 1999 by its predecessor, the OAU to create a new continental organisation to build on its work. The decision to re-launch Africa’s pan-African organisation was the outcome of a consensus by African leaders that in order to realise Africa’s potential, there was a need to refocus attention from the fight for decolonisation and ridding the continent of apartheid, which had been the focus of the OAU, towards increased cooperation and integration of African states to drive Africa’s growth and economic development.
The AU is guided by its vision of “An Integrated, Prosperous and Peaceful Africa, driven by its own citizens and representing a dynamic force in the global arena.”
The Constitutive Act of the African Union and the Protocol on Amendments to the Constitutive Act of the African Union lay out the aims of the AU which are:
The work of the AU is implemented through several principal decision making organs:- The Assembly of Heads of State and Government, the Executive Council, the Permanent Representatives Committee (PRC), Specialised Technical Committees (STCs), the Peace and Security Council and The African Union Commission. The AU structure promotes participation of African citizens and civil society through the Pan-African Parliament and the Economic, Social & Cultural Council (ECOSOCC).
Organs that handle judicial and legal matters as well as human rights issues include:- African Commission on Human and Peoples’ Rights (ACHPR), African Court on Human and Peoples’ Rights (AfCHPR), AU Commission on International Law (AUCIL), AU Advisory Board on Corruption (AUABC) and the African Committee of Experts on the Rights and Welfare of the Child. The AU is also working towards the establishment of continental financial institutions (The African Central Bank, The African Investment Bank and the African Monetary Fund)
The Regional Economic Communities (RECs) and the African Peer Review Mechanism are also key bodies that that constitute the structure of the African Union.
To ensure the realisation of its objectives and the attainment of the Pan African Vision of an integrated, prosperous and peaceful Africa, Agenda 2063 was developed as a strategic framework for Africa’s long term socio-economic and integrative transformation. Agenda 2063 calls for greater collaboration and support for African led initiatives to ensure the achievement of the aspirations of African people.
Answer is posted for the following question.
Answer
Redeem Your Fetch Rewards Points Exchange points for free gift cards by going to the Rewards page and scrolling through your options under Use
Answer is posted for the following question.
How to claim fetch rewards?
Answer
- hold your baby securely and never leave them unattended
- use water that's lukewarm, not hot
- perform the bath in a warm room
- keep baths short, between 5 and 10 minutes
- wash your baby's eyes and face with water only
Answer is posted for the following question.
How to glow my baby skin?
Answer
Canberra Blinds, Awning & Curtain Centre
Address: 2/8 Townsville St, Fyshwick ACT 2609, Australia
Answer is posted for the following question.
I am looking for the best blinds in Canberra, Australia?
Answer
Spread your feet apart to give your body a wide base of support · Stand as close as possible to the object you are lifting · Bend at your knees ,
Answer is posted for the following question.
Why bend knees when lifting?
Answer
Nicholas indeed, under the influence of Pobedonostsev, believed the maintenance of autocracy to be a sacred obligation toward God himself This view was
Answer is posted for the following question.
What did tsar nicholas ii believe in?