Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5
Default 03 to 07 function update

Below is the code I am using in 2003 vba. It does not work in 2007.

Dim wks As Worksheet
If Left(wks.Name, 1) = "R" Then - 07 does not like Left

end if

I tried finding the correct function on 2007 but got no where with it. Any
help would be greatly appreciated.
Ta,
Martin


  #2   Report Post  
Posted to microsoft.public.excel.programming
r r is offline
external usenet poster
 
Posts: 125
Default 03 to 07 function update

try ...
If VBA.Strings.Left(wks.Name, 1) = "R" Then
regards
r


Il mio ultimo lavoro ...
http://excelvba.altervista.org/blog/...ternative.html


"Martin Wheer" wrote:

Below is the code I am using in 2003 vba. It does not work in 2007.

Dim wks As Worksheet
If Left(wks.Name, 1) = "R" Then - 07 does not like Left

end if

I tried finding the correct function on 2007 but got no where with it. Any
help would be greatly appreciated.
Ta,
Martin



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,049
Default 03 to 07 function update

as given, the wks object hasn't been set to a worksheet

if you add for example
Set wks = ActiveSheet
it works fine:

Dim wks As Worksheet
Set wks = ActiveSheet
If Left(wks.Name, 1) = "R" Then
'do something
End If


"Martin Wheer" wrote in message
...
Below is the code I am using in 2003 vba. It does not work in 2007.

Dim wks As Worksheet
If Left(wks.Name, 1) = "R" Then - 07 does not like Left

end if

I tried finding the correct function on 2007 but got no where with it.
Any help would be greatly appreciated.
Ta,
Martin

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
now function not to update baha Excel Discussion (Misc queries) 0 September 25th 09 11:46 AM
Don't Update Function RedFive Excel Discussion (Misc queries) 1 September 23rd 08 02:38 PM
function update rossita77BG Excel Worksheet Functions 3 May 18th 08 05:49 PM
Function Update Stevek Excel Worksheet Functions 3 December 14th 06 06:48 PM
How to get function to update itself with changes richardbok Excel Programming 3 February 27th 04 02:26 AM


All times are GMT +1. The time now is 09:57 PM.

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"