Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
dan dan is offline
external usenet poster
 
Posts: 113
Default Deleting a User Input Row

I set up a InputBox to capture the ROW that the user would
like to Delete, If Input = 6 then ClearContents of the
row, etc. I started like this:

Dim RName as Interger
RName=InputBox("Enter Row to be deleted", "Row Number")

How do I use the "RName" to select and delete the entire
row?

I used the RName like this:

If RName = 6 Then



  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 12
Default Deleting a User Input Row

This should work:

Rows(RName).Delete

-Erik

"Dan" wrote in message
...
I set up a InputBox to capture the ROW that the user would
like to Delete, If Input = 6 then ClearContents of the
row, etc. I started like this:

Dim RName as Interger
RName=InputBox("Enter Row to be deleted", "Row Number")

How do I use the "RName" to select and delete the entire
row?

I used the RName like this:

If RName = 6 Then





  #3   Report Post  
Posted to microsoft.public.excel.programming
dan dan is offline
external usenet poster
 
Posts: 113
Default Deleting a User Input Row

Erik, thanks that worked with my If statements testin if
the input was greater than 6 and =6.

How would I test (If statement) if the first cell in (user
InputRow) "RName" row is blank? I had:

If Cells(RName,0).Value ="" Then
MsgBox "Row is blank"

but this errors w/message: Run-time error 1004:
Application defined or object-defined error.

-----Original Message-----
This should work:

Rows(RName).Delete

-Erik

"Dan" wrote in

message
...
I set up a InputBox to capture the ROW that the user

would
like to Delete, If Input = 6 then ClearContents of the
row, etc. I started like this:

Dim RName as Interger
RName=InputBox("Enter Row to be deleted", "Row Number")

How do I use the "RName" to select and delete the entire
row?

I used the RName like this:

If RName = 6 Then





.

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 12
Default Deleting a User Input Row

change the 0 to 1 since indexing starts at 1:

If Cells(RName,1).Value ="" Then

"Dan" wrote in message
...
Erik, thanks that worked with my If statements testin if
the input was greater than 6 and =6.

How would I test (If statement) if the first cell in (user
InputRow) "RName" row is blank? I had:

If Cells(RName,0).Value ="" Then
MsgBox "Row is blank"

but this errors w/message: Run-time error 1004:
Application defined or object-defined error.

-----Original Message-----
This should work:

Rows(RName).Delete

-Erik

"Dan" wrote in

message
...
I set up a InputBox to capture the ROW that the user

would
like to Delete, If Input = 6 then ClearContents of the
row, etc. I started like this:

Dim RName as Interger
RName=InputBox("Enter Row to be deleted", "Row Number")

How do I use the "RName" to select and delete the entire
row?

I used the RName like this:

If RName = 6 Then





.



  #5   Report Post  
Posted to microsoft.public.excel.programming
dan dan is offline
external usenet poster
 
Posts: 113
Default Deleting a User Input Row

Thanks Erik you fix worked great. Disregard my new post. I
was not sure if I could ask a question thru my original
post. Dan
-----Original Message-----
change the 0 to 1 since indexing starts at 1:

If Cells(RName,1).Value ="" Then

"Dan" wrote in

message
...
Erik, thanks that worked with my If statements testin if
the input was greater than 6 and =6.

How would I test (If statement) if the first cell in

(user
InputRow) "RName" row is blank? I had:

If Cells(RName,0).Value ="" Then
MsgBox "Row is blank"

but this errors w/message: Run-time error 1004:
Application defined or object-defined error.

-----Original Message-----
This should work:

Rows(RName).Delete

-Erik

"Dan" wrote in

message
.. .
I set up a InputBox to capture the ROW that the user

would
like to Delete, If Input = 6 then ClearContents of the
row, etc. I started like this:

Dim RName as Interger
RName=InputBox("Enter Row to be deleted", "Row

Number")

How do I use the "RName" to select and delete the

entire
row?

I used the RName like this:

If RName = 6 Then





.



.

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Prompt user for input and utilize that input ninner Excel Worksheet Functions 2 March 28th 07 09:44 PM
Saving without deleting previous input kdmarvin Excel Worksheet Functions 10 March 14th 07 09:51 PM
Have user input converted to uppercase in same cell as input? Shannonn New Users to Excel 1 June 20th 06 03:19 AM
deleting rows that are not equal to a value entered from an input box, Please Help Me Laura[_5_] Excel Programming 1 July 2nd 04 02:06 PM
CODE to select range based on User Input or Value of Input Field Sandi Gauthier Excel Programming 4 December 8th 03 03:22 PM


All times are GMT +1. The time now is 02:43 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"