LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
Max Max is offline
external usenet poster
 
Posts: 9,221
Default Modify sub to swap text phrases in cells

Hi guys,

How could the sub below be modified for
it to work with for example: text phrases in A1 and A2?
(It currently works only with numbers/integers in A1 and A2)

Private Sub CommandButton1_Click()
Dim x As Integer
x = Range("a1").Value
Range("a1").Value = Range("a2").Value
Range("a2").Value = x
End Sub

Thanks
--
Rgds
Max
xl 97
---
GMT+8, 1° 22' N 103° 45' E
xdemechanik <atyahoo<dotcom
----


 
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
Searching String for phrases/multiple text strings Altair1972m Excel Worksheet Functions 4 May 16th 09 10:44 AM
How can I swap cells Josh W Excel Discussion (Misc queries) 6 March 10th 09 07:13 PM
Use of Text Phrases in Excel Functions Girija Excel Worksheet Functions 0 March 16th 06 06:31 AM
Text Strings Swap Mzansi Excel Worksheet Functions 1 November 29th 05 11:04 AM
Swap Cells William Wolfe Excel Discussion (Misc queries) 4 June 16th 05 05:18 PM


All times are GMT +1. The time now is 01:55 AM.

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"