Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
The following macro needs tweaking and I am not able in any way...could
someone please have a look at it and help me! 1) When I run the macro the following error appears: runtime error 91... Object variable or With block variable not set. If I substitute rngNd with "C1:C20" no error message comes up. obviously I would like to use rngNd. 2) I have tried entering "*" & strPO (which works for finding text earlier on in the macro) but when applied as shown below it does not work. Dim strCtr As String Dim Cell As Range Dim LastR As Long Dim rngNd As Range LastR = Cells(Rows.Count, "C").End(xlDown).Row rngNd = Range("C1:C" & LastR) strCtr = Application.InputBox(prompt:= _ "Inserisci Nome Contratto") For Each Cell In wksTo.Range(rngNd) If Cell.Value = "*" & strPO And Cell.Offset(0, -2).Value = 0 Then Cell.Offset(0, -2).Value = strCtr End If Next Cell End Sub Thanks in advance. |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
hi, how to compare two string values, if the string values r from inputbox in VB | Excel Programming | |||
How do I restrict an inputbox to 5<= string characters? | Excel Programming | |||
InputBox function - prompt string limit | Excel Programming | |||
Fix InputBox - Returning Empty String | Excel Programming | |||
String length of Inputbox user input. | Excel Programming |