View Single Post
  #7   Report Post  
Posted to microsoft.public.excel.programming
Don Guillett Don Guillett is offline
external usenet poster
 
Posts: 10,124
Default active offset

If you INSIST on doing it this way, you need to specify the cell. There is
no such thing as range("activecell")

Sub cutpaste()
Sheets("sheet10").Range("d16").Cut _
Destination:=Sheets("sheet9").Range("a1").offset( etc
End Sub


--
Don Guillett
SalesAid Software

"Curt" wrote in message
...
when I try to copy it will not let me paste? Don't know why.This is code
for
copy not right.
Sub active_offset()
Range("a2").Select
Selection.Cut
------------------------trouble from here
Sheets("data").Select
Range("active cell").Select
ActiveCell.Offset(0, -1).Value = "desc,a2"
ActiveSheet.Paste
I am in wksheet desc want to cut then paste to active cell offset wksheet
data active cell
Thanks for your effort I greatly appreciate it


"Don Guillett" wrote:

Send your workbook, with code and details of what you want and I will
have a
look.

--
Don Guillett
SalesAid Software

"Curt" wrote in message
...
Hope you get this one first. Got away from screen and helped with
reply.
Ihave a macro in column 'N?' in data wksheet. This macro calls a
procedure
that formats and sets up desc wksheet cell A2. text is then entered.
Now
need
to be able to cut & paste 'A2' to Active cell 'N?' offset to column
'Mcell?'
Useing an active cell ref all I have to do for each cell is call
procedure.
Thanks for Your Patiance.



"Don Guillett" wrote:

You can probably have a much simpler looping macro. Why not give us
much
more info.

--
Don Guillett
SalesAid Software

"Curt" wrote in message
...
I am trying to use the active cell offset so as not to have to have a
procedure for each cell. This operation must be done repeated times.
Trying
to figure how to write one procedure that can reference where called
from
so
as to call it the active cell to offset from. This way all I need to
do
is
call this procedure from the cells in repeated moves.May be up to
150
times
to enter data to use this method. If I can keep from having to use
addresses
in each call that is what I am after I think. It is hard to explain
and
for
another to grasp.
I will toy with what you sent and see what I can do
Thanks



"Don Guillett" wrote:

It's not clear to me what you are trying to do but this will MOVE a
cell
to
another worksheet withOUT any selections of any kind. This is a ONE
liner
that I split using the continuation _ to prevent word wrap.

Sub cutpaste()
Sheets("sheet10").Range("d16").Cut _
Destination:=Sheets("sheet9").Range("G1")
End Sub

without the split
Sheets("sheet10").Range("d16").Cut
Destination:=Sheets("sheet9").Range("G1")

--
Don Guillett
SalesAid Software

"Curt" wrote in message
...
never used this. Am trying to call sub desc_1 with a macro in m16
of"
data".
This takes me to a diff wksheet "desc". I then input data. Want
ot
cut
and
paste the cell back to L16 of"data" i called from. This would be
offset
1.
following is the subs I am trying to work with. Can I declare
m16
of
sheet
the active cell?
Old Dog New Tricks
Thanks


Sub Desc_1()
'
' Desc_1 Macro
' Macro recorded 1/11/2007 by Default
'
Range("N16").Select
Sheets("Desc").Select
Range("A2").Select
Rows("2:2").RowHeight = 78
Columns("A:A").ColumnWidth = 39
Selection.NumberFormat = "@"
With Selection
.HorizontalAlignment = xlGeneral
.VerticalAlignment = xlTop
.WrapText = True
.Orientation = 0
.AddIndent = False
.ShrinkToFit = False
.MergeCells = False
End With
Selection.Locked = True
Selection.FormulaHidden = False
End Sub
Sub Desc_1A()
'
' Desc_2 Macro
' Macro recorded 1/11/2007 by Default
'
Range("A2").Select
Selection.Cut
Sheets("Data").Select
Range("M16").Select
ActiveSheet.Paste
Selection.NumberFormat = "@"
With Selection
.HorizontalAlignment = xlCenter
.VerticalAlignment = xlCenter
.WrapText = True
.Orientation = 0
.AddIndent = False
.ShrinkToFit = True
.MergeCells = False
End With
Selection.Locked = True
Selection.FormulaHidden = False
End Sub