Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default A little help with some code please.


What I am trying to do:
I have a bunch of data on SHEET1. If the value of A7 <= 0 I would like
to have a button show up in P7 that says “MOVE”. If you click that
“MOVE” button it will cut B7 through H7 from the sheet and append it to
SHEET2. Then go back to SHEET1 and (I guess) move up B7 through H7.
The problem is there are formulas in A, I, J, K, L, M, and N. so I just
cant CUT the whole line as it will mess up all my formulas.

Thank you very much for your help in this matter.

Ken


--
sungen99
------------------------------------------------------------------------
sungen99's Profile: http://www.excelforum.com/member.php...fo&userid=9144
View this thread: http://www.excelforum.com/showthread...hreadid=537233

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 20
Default A little help with some code please.

I do not know where you want paste data?,
but taste this: (I think, that you have already button).

Private Sub CommandButton1_Click()
Application.ScreenUpdating = False
Range("B7:H7").Select
Selection.Copy
Sheets(2).Select
Sheets(2).Range("B7").Select
Sheets(2).Paste
Sheets(1).Select
Application.CutCopyMode = False
Selection.Delete Shift:=xlUp
Range("B7").Select
Application.ScreenUpdating = True
End Sub

Kind Regards,
Andrzej



sungen99 napisał(a):
What I am trying to do:
I have a bunch of data on SHEET1. If the value of A7 <= 0 I would like
to have a button show up in P7 that says �MOVE�. If you click that
�MOVE� button it will cut B7 through H7 from the sheet and append it to
SHEET2. Then go back to SHEET1 and (I guess) move up B7 through H7.
The problem is there are formulas in A, I, J, K, L, M, and N. so I just
cant CUT the whole line as it will mess up all my formulas.

Thank you very much for your help in this matter.

Ken


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
split post code (zip code) out of cell that includes full address Concord Excel Discussion (Misc queries) 4 October 15th 09 06:59 PM
Drop Down/List w/Code and Definition, only code entered when selec Spiritdancer Excel Worksheet Functions 2 November 2nd 07 03:57 AM
do anybody have a sample code for executing excel macro from vb code?<eom B Deepak Excel Programming 2 September 30th 05 09:59 AM
stubborn Excel crash when editing code with code, one solution Brian Murphy Excel Programming 0 February 20th 05 05:56 AM
option buttons run Click code when value is changed via VBA code neonangel Excel Programming 5 July 27th 04 08:32 AM


All times are GMT +1. The time now is 12:37 AM.

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"