Добрый день!
Всем успешного 2018 года!
Ниже приведенном примере возможно ли, чтобы значение в макросе брались из определенных ячеек. А именно в строке
Всем успешного 2018 года!
Ниже приведенном примере возможно ли, чтобы значение в макросе брались из определенных ячеек. А именно в строке
| Код |
|---|
Range("K8:O13").Select |
диапазон ячеек определяемые размерами прямоугольника. Ячейки B1 и B4.
И размеры ячеек (в сантиметрах, для правильного масштаба) в строке кода
| Код |
|---|
Selection.RowHeight = 28.25 Selection.ColumnWidth = 4.14 |
брались из ячеек B3 и B6 соответственно.
За ранее спасибо за помощь.
Скрытый текст |
|---|
| Sub Макрос9() ' ' Макрос9 Макрос ' ' Range("K8:O13").Select Selection.RowHeight = 28.25 Selection.ColumnWidth = 4.14 With Selection.Borders(xlDiagonalDown) .LineStyle = xlDouble .ColorIndex = xlAutomatic .TintAndShade = 0 .Weight = xlThick End With With Selection.Borders(xlDiagonalUp) .LineStyle = xlDouble .ColorIndex = xlAutomatic .TintAndShade = 0 .Weight = xlThick End With With Selection.Borders(xlEdgeLeft) .LineStyle = xlDouble .ColorIndex = xlAutomatic .TintAndShade = 0 .Weight = xlThick End With With Selection.Borders(xlEdgeTop) .LineStyle = xlDouble .ColorIndex = xlAutomatic .TintAndShade = 0 .Weight = xlThick End With With Selection.Borders(xlEdgeBottom) .LineStyle = xlDouble .ColorIndex = xlAutomatic .TintAndShade = 0 .Weight = xlThick End With With Selection.Borders(xlEdgeRight) .LineStyle = xlDouble .ColorIndex = xlAutomatic .TintAndShade = 0 .Weight = xlThick End With Selection.Borders(xlInsideVertical).LineStyle = xlNone Selection.Borders(xlInsideHorizontal).LineStyle = xlNone With Selection.Interior .Pattern = xlPatternRectangularGradient .Gradient.RectangleLeft = 0.5 .Gradient.RectangleRight = 0.5 .Gradient.RectangleTop = 0.5 .Gradient.RectangleBottom = 0.5 .Gradient.ColorStops.Clear End With With Selection.Interior.Gradient.ColorStops.Add(0) .ThemeColor = xlThemeColorDark1 .TintAndShade = 0 End With With Selection.Interior.Gradient.ColorStops.Add(1) .ThemeColor = xlThemeColorDark1 .TintAndShade = -0.149021881771294 End With End Sub |