Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi!
Am not able to make the macro continue after an msgbox has been displayed. This msgbox come as an warning if one cell in the column, contains the same contents as the textbox 1 is going to insert to the same or another cell in the column range. I want the user to be able to do changes in the textboxes on this userform, after the msgbox has been displayed, but it only work when it's not duplicate contents in the range Any suggestions? Application.ScreenUpdating = False Dim myStr As String myStr = TextBox1.Text If Application.CountIf(v, myStr) 0 Then ans = MsgBox("This serialnumber allready exist! Press OK if you want to continue", vbOKCancel) If ans = vbCancel Then Exit Sub Else Dim iCtr As Integer iCtr = ComboBox1.Value Range("B" & CStr(iCtr + 3)) = Me.ComboBox2 Range("C" & CStr(iCtr + 3)) = Me.TextBox1 Range("D" & CStr(iCtr + 3)) = Me.TextBox2 Range("E" & CStr(iCtr + 3)) = Me.TextBox3 Range("F" & CStr(iCtr + 3)) = Me.TextBox4 Range("G" & CStr(iCtr + 3)) = Me.TextBox5 Range("H" & CStr(iCtr + 3)) = Me.Comboday & Me.Combomonth & Me.Comboyear If TextBox1.Text = "" Then Range("B" & CStr(iCtr + 3)).ClearContents If TextBox1.Text = "" Then Range("C" & CStr(iCtr + 3)).ClearContents End If -- Axel Copy & paste developer |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
popup msgbox ok continue simple code | Excel Programming | |||
Problem with Update Link prompt to Continue | Excel Discussion (Misc queries) | |||
macro to scroll the worksheet and continue to run macro in backgro | Excel Programming | |||
VB code to continue macro | Excel Discussion (Misc queries) | |||
Novice - MsgBox Yes/No - Continue if Yes, Close if No | Excel Discussion (Misc queries) |