Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Code modification help please
Hello,
Could some one please help me modify the following vba code so that I can enter string-text into column A instead of a long-number? Private Sub Worksheet_SelectionChange(ByVal Target As Range) Dim lrowA As Long Dim lrowH As Long lrowA = Cells(Rows.Count, "A").End(xlUp).Row lrowH = Cells(Rows.Count, "H").End(xlUp).Row If lrowH < lrowA Then For i = lrowH + 1 To lrowA Cells(i, "H").FillDown Next End If End Sub Any help would be greatly appreciated. Thanks, Chris. *** Sent via Developersdex http://www.developersdex.com *** |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Code modification help please
Not sure what you mean - this code doesn't prevent using text in column
A. It wouldn't require longs in any case - all numbers in XL cells are doubles. What is the problem you're experiencing? In article , Chris Hankin wrote: Hello, Could some one please help me modify the following vba code so that I can enter string-text into column A instead of a long-number? Private Sub Worksheet_SelectionChange(ByVal Target As Range) Dim lrowA As Long Dim lrowH As Long lrowA = Cells(Rows.Count, "A").End(xlUp).Row lrowH = Cells(Rows.Count, "H").End(xlUp).Row If lrowH < lrowA Then For i = lrowH + 1 To lrowA Cells(i, "H").FillDown Next End If End Sub Any help would be greatly appreciated. Thanks, Chris. *** Sent via Developersdex http://www.developersdex.com *** |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Code modification help please
Hello JE McGimpsey, thanks for your reply. The problem I was
experiencing was that my spreadsheet was 'protected' and thus causing a run-time error '1004'. I have left my spreadsheet 'unprotected' and am able to populate text into column A. Kind regards, Chris. *** Sent via Developersdex http://www.developersdex.com *** |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
modification to this code | Excel Discussion (Misc queries) | |||
Code modification help | Excel Worksheet Functions | |||
Modification in the CODE to HIDE rows and columns that start with ZERO (code given) | Excel Programming | |||
modification for the code | Excel Programming | |||
Code Modification | Excel Programming |