Добрый вечер.Уважаемые гуру эксель, помогите пожалуйста соединить два макроса в один. Пожалуйста. Заранее спасибо откликнувшимся.
Код |
---|
Option Explicit Private Sub Workbook_SheetSelectionChange(ByVal Sh As Object, ByVal Target As Range) Dim b As Boolean, s As Shape On Error Resume Next b = Target.Validation.InCellDropdown If b Then For Each s In Sh.Shapes If s.Name Like "Drop Down*" Then If s.Width < 300 Then s.Width = 300 End If End If Next s End If End Sub Private Sub Workbook_Open() Dim rr As Range, rc As Range On Error Resume Next Application.ScreenUpdating = False Set rr = Worksheets("Ëèñò1").Range("A1,C1,G5,C7:C14,E7:E8,G7:G9") If rr Is Nothing Then Exit Sub On Error GoTo 0 For Each rc In rr.Cells With rc If Len(.Value) Then .Hyperlinks.Add rc, "", "", (.Value), (.Value) With .Font .ColorIndex = xlAutomatic .TintAndShade = 0 .Underline = xlUnderlineStyleNone End With End If End With Next Application.ScreenUpdating = True End Sub |