Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hello All,
First problem: I have code. It acts correctly, but 1) when I fill cells for method drag and drop 2) when I delete a few cells In these cases displays mistake. How to improve this?? Second problem: How to make to my code compared 4 signs as well as it checked the correctness of formula? For example: nag= "NGDf" x= "NGDf-100R" and wpis = "NGDf" Comparison is OK, but if user write something different (NGDf-10000R, or NGDf-1R, or only NGDf) ?? ??? I need the checking the correctness of formulas: 1) LLLL-000L 2) 000.00.0000 whe L - letter; 0 - number Private Sub Worksheet_Change(ByVal Target As Range) Application.EnableEvents = False ' STOP EVENTS Dim x, nag, wpis As String Dim k As Integer k = 1 x = Target.Value ' blokada wpisu niewła¶ciwej nazwy cechy do zakładki While k < 254 If Not Application.Intersect(Columns(k), Target) Is Nothing Then nag = Right(Cells(1, k), 4) wpis = Left(x, 4) 'compare 4 signs If nag < wpis Then MsgBox " Pomyliłe¶ zakładki!!! " & Chr(10) & _ Chr(10) & " Spróbuj ponownie (Try again) " Target.Value = "" End If End If k = k + 2 Wend Application.EnableEvents = True 'REACTIVATE EVENTS |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Problems with ngs | Excel Worksheet Functions | |||
aauugghhh...#div/o problems & various average formula problems | Excel Worksheet Functions | |||
Problems with IRM | Charts and Charting in Excel | |||
Problems merging an excel file due to code or file problems? | Excel Programming | |||
can someone help me with this problems please? | Excel Programming |