Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 287
Default Basic Question about varaibles

I am trying to use the rows command. I know how to use it if the row is a
number. For example, I know that this would work: rows(1:1)

However I was to use a variable instead of a number. Here is what I have.
It isn't working. Thank you.


Rows("i:i").Delete Shift:=xlUp

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,302
Default Basic Question about varaibles

Hi Adam,

Try:

Rows(i).Delete

---
Regards,
Norman



"Adam" wrote in message
...
I am trying to use the rows command. I know how to use it if the row is a
number. For example, I know that this would work: rows(1:1)

However I was to use a variable instead of a number. Here is what I have.
It isn't working. Thank you.


Rows("i:i").Delete Shift:=xlUp



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 32
Default Basic Question about varaibles

hi,

this way, it should be OK.

Sub test()
I = 6
johndoe = I & ":" & I
Rows(johndoe).Interior.ColorIndex = 19

End Sub

see ya later

"Adam" a écrit dans le message de news:
...
I am trying to use the rows command. I know how to use it if the row is a
number. For example, I know that this would work: rows(1:1)

However I was to use a variable instead of a number. Here is what I have.
It isn't working. Thank you.


Rows("i:i").Delete Shift:=xlUp



  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 22,906
Default Basic Question about varaibles

Adam

Sub test()
Dim i As Long
i = InputBox("enter a number")
Rows(i).Delete Shift:=xlUp
MsgBox "row " & i & " was deleted"
End Sub





On Mon, 10 Jan 2005 14:23:02 -0800, "Adam"
wrote:

I am trying to use the rows command. I know how to use it if the row is a
number. For example, I know that this would work: rows(1:1)

However I was to use a variable instead of a number. Here is what I have.
It isn't working. Thank you.


Rows("i:i").Delete Shift:=xlUp


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
Very basic VBA question. Cerberus Excel Discussion (Misc queries) 1 July 21st 08 04:30 PM
Basic question...sorry jen the runner Excel Worksheet Functions 11 September 18th 07 12:12 AM
replacing varaibles in formula monika Excel Programming 1 February 26th 04 01:59 PM
BASIC VBA QUESTION MASON Excel Programming 1 December 26th 03 05:04 PM
Basic VBA question Henrik[_2_] Excel Programming 2 October 25th 03 12:23 AM


All times are GMT +1. The time now is 06:18 AM.

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"