Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Microsoft Office > Excel VBA > Excel VBA
|
Excel VBA Discuss using VBA for Excel programming.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Excel VBA section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old May 28th, 2007, 01:37 PM
Registered User
 
Join Date: May 2007
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default TRIM, ISTEXT function won't work in Excel VBA code

Envirnment: Using Windows 2003 and Office 2007 upto date with all service packs.

Problem: Even after installing all Excel Adds-in bunch of Excel functions ( Text and Information functions) doesn't work from within the VBA code but they work fine in the Excel sheet itself.

I was able to make Excel ROWS and COLUMN function to work in VBA but Trim, Clean, or ISNONTEXT just won't work. I have tried all possible combinations of syntax and was able to compile in VBE but no luck.

MyName1 = Cells(4,5)
MyName2 = ([=Trim(MyName)]) ----it give runt time error code 2029

MaxNumberOfMyTable = [=MAX(PatientTable[PID]]
Above MAX function did not work either. PID is the column name.

But this works fine:
LastRow = [=Rows(PatientTable[PatientName])]

Why the adds-in is asking for password when tried to open them in the in the project browser window? How/where to get the passwords from?
 
Old May 29th, 2007, 09:35 AM
Registered User
 
Join Date: Dec 2006
Posts: 6
Thanks: 0
Thanked 0 Times in 0 Posts
Default

When you using Worksheet Function On VBA with Evaluate Method please remove = sign

From you error:

MyName2 = ([=Trim(MyName)])

The correction is :

MyName2 = ([Trim(MyName)])

N. Yauvasuta
MVP Excel





Similar Threads
Thread Thread Starter Forum Replies Last Post
vba work outlook with excel sheet qunatphil Excel VBA 1 April 16th, 2008 12:30 PM
Code works in Excel VBA but not Access VBA fossx Access VBA 2 May 21st, 2007 08:00 AM
Trim a string in VBA lryckman Access VBA 2 January 19th, 2007 08:39 AM
Excel 2003 VBA Function RollingWoodFarm Excel VBA 15 August 2nd, 2006 04:24 PM
Half the code in Access 2000 VBA doesn't work disruptivehair BOOK: Beginning Access VBA 0 December 26th, 2005 02:21 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.