I did, but then merging will not proceed. The code is part of a bigger command.
Private Sub CmdMeetingCSC_Click()
On Error GoTo error_handler
RepeatInputBoxMeetingCSC:
Set sRng = Application.InputBox(prompt:="Select period for this Event", Left:=30, Top:=80, Type:=8)
With sRng
If sRng.Rows.Count > 1 Then
Set sRng = Nothing
MsgBox "You selected more then one Row! Select the correct Period for this Event"
GoTo RepeatInputBoxMeetingCSC
End If
.HorizontalAlignment = xlCenter
.VerticalAlignment = xlCenter
.MergeCells = True
StrMeetingCSC = "Meeting CSC"
StrOffice = "Office"
With sRng
.ClearFormats
.Value = StrMeetingCSC & Chr(10) & IIf(TglbMeetingRoom.Value = True, "[M] ", "[ ] ") & StrOffice & IIf(TglbBeamer.Value = True, " [B]", " [ ]")
.Characters(Start:=1, Length:=Len(StrMeetingCSC)).Font.Bold = True
End With
If OpBProposed.Value = True Then sRng.Interior.ColorIndex = 35
If OpBScheduled.Value = True Then sRng.Interior.ColorIndex = 4
If OpBConfirmed.Value = True Then sRng.Interior.ColorIndex = 50
End With
error_handler:
Exit Sub
End Sub
Bookmarks