Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.newusers
external usenet poster
 
Posts: 3
Default How to reference an active cell

I've recorded a simple macro for Excel, where I work with a row. But I want
to work with a row the active cell is on, but Macro Recorder has writen me
an absolute referencing. Should anyone help me, how to rewrite the code?

Sub Zašedění_řádku()
Range("A12:W12").Select !!!
With Selection.Interior
.ColorIndex = 15
.Pattern = xlSolid
End With
End Sub

--
Tomas Vognar, beginner, Office XP

  #2   Report Post  
Posted to microsoft.public.excel.newusers
external usenet poster
 
Posts: 10,593
Default How to reference an active cell

Sub Zašedění_řádku()
With Activecell.Entirerow.Interior
.ColorIndex = 15
.Pattern = xlSolid
End With
End Sub


--
---
HTH

Bob


(there's no email, no snail mail, but somewhere should be gmail in my addy)



"Tomáš Vognar" <vognar(zavinac)esys.cz wrote in message
...
I've recorded a simple macro for Excel, where I work with a row. But I
want
to work with a row the active cell is on, but Macro Recorder has writen me
an absolute referencing. Should anyone help me, how to rewrite the code?

Sub Zašedění_řádku()
Range("A12:W12").Select !!!
With Selection.Interior
.ColorIndex = 15
.Pattern = xlSolid
End With
End Sub

--
Tomas Vognar, beginner, Office XP



  #3   Report Post  
Posted to microsoft.public.excel.newusers
external usenet poster
 
Posts: 3
Default How to reference an active cell

Thank you very much, it works. But is it possible to rewrite it, so that
limited row was marked? (Since Ay to Wy, or using CurrentRegion)

T.Vognar


"Bob Phillips" píše v diskusním příspěvku
...
Sub Zašedění_řádku()
With Activecell.Entirerow.Interior
.ColorIndex = 15
.Pattern = xlSolid
End With
End Sub


--
---
HTH

Bob


(there's no email, no snail mail, but somewhere should be gmail in my
addy)



"Tomáš Vognar" <vognar(zavinac)esys.cz wrote in message
...
I've recorded a simple macro for Excel, where I work with a row. But I
want
to work with a row the active cell is on, but Macro Recorder has writen
me
an absolute referencing. Should anyone help me, how to rewrite the code?

Sub Zašedění_řádku()
Range("A12:W12").Select !!!
With Selection.Interior
.ColorIndex = 15
.Pattern = xlSolid
End With
End Sub

--
Tomas Vognar, beginner, Office XP




  #4   Report Post  
Posted to microsoft.public.excel.newusers
external usenet poster
 
Posts: 10,593
Default How to reference an active cell

I am not understanding. Ay to Wy, what is that referring to?

--
---
HTH

Bob


(there's no email, no snail mail, but somewhere should be gmail in my addy)



"Tomáš Vognar" <vognar(zavinac)esys.cz wrote in message
...
Thank you very much, it works. But is it possible to rewrite it, so that
limited row was marked? (Since Ay to Wy, or using CurrentRegion)

T.Vognar


"Bob Phillips" píše v diskusním příspěvku
...
Sub Zašedění_řádku()
With Activecell.Entirerow.Interior
.ColorIndex = 15
.Pattern = xlSolid
End With
End Sub


--
---
HTH

Bob


(there's no email, no snail mail, but somewhere should be gmail in my
addy)



"Tomáš Vognar" <vognar(zavinac)esys.cz wrote in message
...
I've recorded a simple macro for Excel, where I work with a row. But I
want
to work with a row the active cell is on, but Macro Recorder has writen
me
an absolute referencing. Should anyone help me, how to rewrite the code?

Sub Zašedění_řádku()
Range("A12:W12").Select !!!
With Selection.Interior
.ColorIndex = 15
.Pattern = xlSolid
End With
End Sub

--
Tomas Vognar, beginner, Office XP






  #5   Report Post  
Posted to microsoft.public.excel.newusers
external usenet poster
 
Posts: 3
Default How to reference an active cell

The best would be region defined by intersection of the CurrentRegion and
active line. I'm sorry, I'm trying this, but I get errors or wrong results.
I do not quite understand the syntax of the VBA, for the meantime.

T.Vognar


"Bob Phillips" píše v diskusním příspěvku
...
I am not understanding. Ay to Wy, what is that referring to?

--
---
HTH

Bob


(there's no email, no snail mail, but somewhere should be gmail in my
addy)



"Tomáš Vognar" <vognar(zavinac)esys.cz wrote in message
...
Thank you very much, it works. But is it possible to rewrite it, so that
limited row was marked? (Since Ay to Wy, or using CurrentRegion)

T.Vognar


"Bob Phillips" píše v diskusním příspěvku
...
Sub Zašedění_řádku()
With Activecell.Entirerow.Interior
.ColorIndex = 15
.Pattern = xlSolid
End With
End Sub


--
---
HTH

Bob


(there's no email, no snail mail, but somewhere should be gmail in my
addy)



"Tomáš Vognar" <vognar(zavinac)esys.cz wrote in message
...
I've recorded a simple macro for Excel, where I work with a row. But I
want
to work with a row the active cell is on, but Macro Recorder has writen
me
an absolute referencing. Should anyone help me, how to rewrite the
code?

Sub Zašedění_řádku()
Range("A12:W12").Select !!!
With Selection.Interior
.ColorIndex = 15
.Pattern = xlSolid
End With
End Sub

--
Tomas Vognar, beginner, Office XP








  #6   Report Post  
Posted to microsoft.public.excel.newusers
external usenet poster
 
Posts: 897
Default How to reference an active cell

Sub Zašedění_řádku()
With Range("A12:W12").Interior
.ColorIndex = 15
.Pattern = xlSolid
End With
End Sub


--JP

On Mar 14, 4:24*am, TomᚠVognar <vognar(zavinac)esys.cz wrote:
The best would be region defined by intersection of the CurrentRegion and
active line. I'm sorry, I'm trying this, but I get errors or wrong results..
I do not quite understand the syntax of the VBA, for the meantime.

T.Vognar

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
referring to formula in a non active cell from active cell nickname Excel Discussion (Misc queries) 1 June 21st 07 12:11 PM
Active row cell reference pskwaak Excel Worksheet Functions 2 March 18th 07 01:38 AM
Active cell as a reference to open a worksheet LaDdIe Excel Worksheet Functions 6 March 15th 07 07:06 PM
Active Cell Reference pskwaak Excel Worksheet Functions 8 March 13th 07 02:22 AM
problem with cell reference in =sum(offset(cell reference,x,y,z,a)). Want cell ref to be variable. [email protected] Excel Worksheet Functions 2 December 11th 04 12:05 AM


All times are GMT +1. The time now is 06:12 PM.

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

About Us

"It's about Microsoft Excel"