LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 85
Default VBA string funcs on left side of assignment?

Empirically I learned that the VBA function Mid() can be used on the
left side of an assignment. For example:

s = "12345678"
Mid(s, 4, 2) = "cd"

results in "123cd678". But the following does not work:

Left(s, 2) = "ab"
Right(s,2) = "ef"

Then I looked at the Help text for Mid, and I found nothing that
indicates that even Mid() can be on the left side of an assignment.

Where is written that I can use Mid() on the left side?

Is there something else that I should use to overwrite any part of a
string?

(Other than cumbersome concatenation like Mid(s,1,3) & "cd" & Mid(s,
6,3).)

Is there an easier way to overwrite the left and right parts of a
string other than using Mid()?
 
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
Sum Left Side & Right Side Numbers Rob Excel Worksheet Functions 4 February 18th 10 08:41 PM
how to make left side stay still and right side can move left to r AAS Excel Discussion (Misc queries) 1 May 27th 08 09:50 PM
change rows from left side to right side Rows on wrong side of worksheet[_2_] Excel Discussion (Misc queries) 1 July 27th 07 12:30 AM
y-axis moves from the left hand side to the right hand side JP Excel Discussion (Misc queries) 1 March 13th 05 04:43 PM
y-axis moves from the left hand side to the right hand side! JP Charts and Charting in Excel 1 March 11th 05 12:29 AM


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