Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
End Double Sub
Ok, I understand, but in the code below, this is not that easy. Sub Submitt() cellRun = Worksheets("invoer").Cells(4, 4) If IsEmpty(cellRun) Then Response = MsgBox("Run blank!", vbExclamation, "Input error") If Response = vbOK Then Worksheets("invoer").Cells(4, 4).Select End If Else Application.ScreenUpdating = False Dim K As Long K = Sheets("invoer").Range("B12").Value Select Case K Case 1 *BasicInfo 2* PutColMach "D19", "A1", 6 Case 2 *BasicInfo 2* PutColMach "D19", "A1", 8 End Select If Worksheets("invoer").Range("B14").Value Then *BasicInfo 20* PutColMach "D27", "A1", 6 End If Sheets("invoer").Select Sheets("invoer").Unprotect Range("D6:D7,D19:J19,D27:F27,F21:K21").Select Selection.ClearContents Sheets("invoer").Protect Range("D4").Select Range("D4").Value = Range("D4").Value + 1 End If Application.ScreenUpdating = True End Sub SUB BASICINFO(BYVAL CR AS INTEGER Dim stoprow As Integer Dim cc As Long cc = Sheets("invoer").Range("B9").Value stoprow = 5 + (cc - 1) * 9 -*cellRun = Worksheets("invoer").Range("D4").Value*- Worksheets("collect").Activate Cells(stoprow, cR).Activate *-Do While Not IsEmpty(ActiveCell) 'search th free cell, if same If cellRun = ActiveCell.Value Then 'number, stop completely r = MsgBox("Deze run werd reeds ingevoerd.", vbOKOnly) Exit Sub End If-* ActiveCell.Offset(1, 0).Activate Loop ActiveCell.Range("A1") = Sheets("invoer").Range("D4").Value ActiveCell.Offset(0, 1).Range("A1") Sheets("invoer").Range("D6").Value ActiveCell.Offset(0, 2).Range("A1") Sheets("invoer").Range("D7").Value End Sub Suggestions -- Zur ----------------------------------------------------------------------- Zurn's Profile: http://www.excelforum.com/member.php...fo&userid=1464 View this thread: http://www.excelforum.com/showthread.php?threadid=26724 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Double Match | Excel Worksheet Functions | |||
double axis, double problem (i hope only to me) | Charts and Charting in Excel | |||
Double IF - is this possible | Excel Worksheet Functions | |||
Need Function for Double If | Excel Worksheet Functions | |||
End Double Sub | Excel Programming |