Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Convert to values, but not at current cell

Thanks Tom, that worked. It's just a shame though that
Excel doesn't recognize the need to do this sort of thing
without VBA

-----Original Message-----
I included an inputbox to select the range since using

one to select the
destination cleared the clipboard.

Sub Convert_From_To_Values()
Dim rngSource As Range
Dim rng As Range
Dim Msg, Style, Title, Response
Msg = "Select rectangular range to copy using the mouse"
Title = "Copy Range"
On Error Resume Next
Set rngSource = Application.InputBox(Msg, Title, Type:=8)
On Error GoTo 0
If rngSource Is Nothing Then
MsgBox "You cancelled"
Else

Msg = "The selected cells were copied to the clipboard,"

& _
vbCrLf & _
"Now you should select a same sized area for the

pasting" & _
vbCrLf & _
" or select a single cell as upper left corner of

destination range" & _
vbCrLf & _
" use the mouse to select"
Title = "Copy and Message Help Box" ' Define title.
On Error Resume Next
Set rng = Application.InputBox(Msg, Title, Type:=8)
On Error GoTo 0

If Not rng Is Nothing Then
rngSource.Copy
rng(1).PasteSpecial xlValues
End If
End If
Application.CutCopyMode = False

End Sub

--
Regards,
Tom Ogilvy


"Bruce Roberson" wrote in

message
...
I already have a macro that converts a selection to
values, so this one will be different. This macro will

be
executed from a toolbar icon that is clicked while a
highlighted area is already selected unless you suggest

I
put a prompt in to select that first.

But here it is so far with the assumption that an area

is
already highlighted when this icon is clicked calling

this
macro.


Sub Convert_From_To_Values()
Selection.Copy


Dim Msg, Style, Title, Response
Msg = "The selected cells were copied to the

clipboard," _
& "now you should select a same sized area for the
pasting" ' Define message.
Style = vbOK ' Define buttons.
Title = "Copy and Message Help Box" ' Define title.
Response = MsgBox(Msg, Style, Title)
If Response = vbOK Then ' User chose OK.


' need a method here to pause till userhighlights
a selection'

Selection.PasteSpecial Paste:=xlValues
Else ' User chose No.
Application.CutCopyMode = False
End If
End Sub


Thanks for your suggestions,



Bruce



.

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 47
Default Convert to values, but not at current cell

I know about that combination which is already on my menus
now. I just meant earlier I wish Excel combined that into
one function, rather than two.
-----Original Message-----
if you go to tools=Customize, then go to the second tab

and look through
the icons, there should be an icon under the Edit

category for Paste Values.
Drag that onto the menu bar of choice.

You would need to select a range, click the copy button,

select another
range, click the Paste Values button.

--
Regards,
Tom Ogilvy


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
Return range of cell values based on current date WingH Excel Worksheet Functions 1 March 31st 10 07:35 PM
Trying to convert mm/yy in text to Dec-07, it adds day & current y Excellency Excel Worksheet Functions 12 March 24th 10 07:52 PM
change cell values of to reflect most current entry in a range MARYINNEED Excel Worksheet Functions 3 April 13th 08 06:52 PM
Convert Hard-coded cell values to constants Takeadoe Excel Discussion (Misc queries) 2 May 20th 06 12:59 AM
Replacing Linked Cell Values w/ Current Values TomCat Excel Worksheet Functions 6 April 10th 06 12:20 PM


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