V
V
Vasily Khryagin2020-11-02 13:03:23
Visual Basic
Vasily Khryagin, 2020-11-02 13:03:23

Can you help me make a drawing in VBA?

Sub Узор() 
Range("A1").Interior.ColorIndex = Rnd() * 8 
Range("B1").Interior.ColorIndex = Rnd() * 8 
Range("C1").Interior.ColorIndex = Rnd() * 8 
Range("D1").Interior.ColorIndex = Rnd() * 8 
Range("A2").Interior.ColorIndex = Rnd() * 8 
Range("B2").Interior.ColorIndex = Rnd() * 8 
Range("C2").Interior.ColorIndex = Rnd() * 8 
Range("D2").Interior.ColorIndex = Rnd() * 8 
 
Range("A1").Copy: Range("H1").PasteSpecial 
Range("B1").Copy: Range("G1").PasteSpecial 
Range("C1").Copy: Range("F1").PasteSpecial 
Range("D1").Copy: Range("E1").PasteSpecial 
 
Range("A2").Copy: Range("H2").PasteSpecial 
Range("B2").Copy: Range("G2").PasteSpecial 
Range("C2").Copy: Range("F2").PasteSpecial 
Range("D2").Copy: Range("E2").PasteSpecial 
 
Range("A1:H2").Copy: Range("A3").PasteSpecial 
Range("A1:H4").Copy: Range("A5").PasteSpecial 
Range("A1:H8").Copy: Range("9").PasteSpecial 
Range("A1").Select


End Sub
1.1. Create a Flower() procedure in the existing module, continuing the new text below. The program code paints the flower stem green, and for the petals it generates colors in the limit of 56.

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question