LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 35,218
Default newbie question

Glad I could help.

If you ever decide that you want to allow the user to pick the cells to copy,
you could tell them to select the range first and use that Selection--or just
ask for the range with a different application.inputbox.

wrote:

This is perfect Thank YOU!

As for your question, the reason I am always coping from B39:p39 is there is
a series of formulas there that gets the information they need for a report.
Again Thank you so very much Dave!

"Dave Peterson" wrote:

So you're always copying from B39:P39?

Dim RngToCopy as range
dim DestCell as range

with activesheet
set rngtocopy = .range("B39:p39")

set destcell = nothing
on error resume next
set destcell = application.inputbox(Prompt:="select a cell",type:=8).cells(1)
on error goto 0

if destcell is nothing then
exit sub 'user hit cancel
end if
End with

with destcell.resize(rngtocopy.rows.count,rngtocopy.col umns.count)
.value = rngtocopy.value
With .font
.Name = "Arial"
.FontStyle = "Regular"
.Size = 10
.Strikethrough = False
.Superscript = False
.Subscript = False
.OutlineFont = False
.Shadow = False
.Underline = xlUnderlineStyleNone
.ColorIndex = 1
end with
End With



wrote:

I am trying to get an input box that will tell what cell I want it to copy
paste information in. I have it to where it will pick the cell, but it won't
do the second half that I need it to do. I know it shouldn't be this hard,
but for me it is today.
Any help would be greatly appreciated.

'
' Update_Agents Macro
' Macro recorded 4/9/2007 by aemmi
'

'
Range("B39:P39").Select
Selection.Copy
Range("B27").Select <this is where I need to be able to change the cell
ActiveSheet.Paste
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone,
SkipBlanks _
:=False, Transpose:=False
Application.CutCopyMode = False
With Selection.Font
.Name = "Arial"
.FontStyle = "Regular"
.Size = 10
.Strikethrough = False
.Superscript = False
.Subscript = False
.OutlineFont = False
.Shadow = False
.Underline = xlUnderlineStyleNone
.ColorIndex = 1
End With
End Sub


--

Dave Peterson


--

Dave Peterson
 
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
Newbie Question Francis Whitaker New Users to Excel 4 March 14th 08 10:26 PM
Real Newbie newbie question Dave New Users to Excel 0 January 10th 07 07:55 PM
If Then Question from Newbie. . . hospitalgreg Excel Discussion (Misc queries) 6 October 16th 06 08:16 PM
Newbie question Barry Clark[_2_] Excel Programming 10 June 12th 06 08:40 PM
Newbie Question - Subtraction Formula Question [email protected] Excel Discussion (Misc queries) 3 May 5th 06 05:50 PM


All times are GMT +1. The time now is 11:56 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"