You are on page 1of 1

SSM-II March-April-2021

Problems for Lab-II

1. Food Corporation of India:

Develop macros for all the eight cases: 1. Four cases (Fine rice, Superfine Rice, Coarse Rice, and
Aggregate) for the case in which distribution can take place from any supply point to any destination
point, ie transshipment is allowed, and 2. Four cases, each of which does not distribute from a supply
point to a destination point, if the two are on incompatible railway lines, ie one of them is on meter
gauge and the other on broad gauge; that is, transshipment not allowed.

Whenever any of the above macros is executed, let the macro write the following additional output, in a
cell of your choice: total quantity of the type of rice in question that is transported through incompatible
supply-demand pairs.

2. VBA Function and SUB:

It is required to find how many times a given substring occurs within a given main-string. For example, in
the string “Hare Rama Hare Krishna” the substring “Hare” occurs twice; the substring “h” occurs thrice.
Develop a VBA function and a VBA sub for the above task. Use your own test data.

3. INPUT BOX in LOCK Procedure.

From web or from your prescribed reading (VBA tutorial) find the way the VBA built in function
INPUTBox works.

Use the INPUTBOX function in the sub for locking selected ranges in the spread sheet developed in your
class, to obtain from the user dynamically the list of ranges to be locked.
-----------

You might also like