Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 41
Default Double Quote Leading to Apostrophe Problem

I am writing VB code lines like this:

Range("m6").Select
ActiveCell.FormulaR1C1 = "=TEXT(L6, ""0.00"")"

When I go to the workbook and run this code I end up with an error in cell
M6 telling me that I have a Name problem.

The actual entry that is dumped into cell M6 is:

=TEXT('L6', "0.00")

Truly! The L6 has an apostrophe preceeding it and behind it. If I edit the
cell and remove the apostrophes then cell M6 has the correct formula in it.

Why are the double quotes leading to an apostrophe problem with the cell
reference of L6? What do I need to change in my coding to make this problem
go away?


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,302
Default Double Quote Leading to Apostrophe Problem

Hi ToferKing,

Try:

ActiveCell.Formula = "=TEXT(L6, ""0.00"")"


---
Regards,
Norman



"ToferKing" wrote in message
...
I am writing VB code lines like this:

Range("m6").Select
ActiveCell.FormulaR1C1 = "=TEXT(L6, ""0.00"")"

When I go to the workbook and run this code I end up with an error in cell
M6 telling me that I have a Name problem.

The actual entry that is dumped into cell M6 is:

=TEXT('L6', "0.00")

Truly! The L6 has an apostrophe preceeding it and behind it. If I edit
the
cell and remove the apostrophes then cell M6 has the correct formula in
it.

Why are the double quotes leading to an apostrophe problem with the cell
reference of L6? What do I need to change in my coding to make this
problem
go away?




  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 41
Default Double Quote Leading to Apostrophe Problem

Yep, that did it! I dropped out R1C1 and the apostrophes went away.

Thanks ever so much.

"Norman Jones" wrote:

Hi ToferKing,

Try:

ActiveCell.Formula = "=TEXT(L6, ""0.00"")"


---
Regards,
Norman



"ToferKing" wrote in message
...
I am writing VB code lines like this:

Range("m6").Select
ActiveCell.FormulaR1C1 = "=TEXT(L6, ""0.00"")"

When I go to the workbook and run this code I end up with an error in cell
M6 telling me that I have a Name problem.

The actual entry that is dumped into cell M6 is:

=TEXT('L6', "0.00")

Truly! The L6 has an apostrophe preceeding it and behind it. If I edit
the
cell and remove the apostrophes then cell M6 has the correct formula in
it.

Why are the double quotes leading to an apostrophe problem with the cell
reference of L6? What do I need to change in my coding to make this
problem
go away?





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
show apostrophe / single quote in cell Beans Excel Discussion (Misc queries) 3 April 4th 23 10:23 AM
Leading Apostrophe Phil-T Excel Discussion (Misc queries) 14 December 15th 09 02:42 AM
Leading Zero & Apostrophe - Help Yvonne Excel Discussion (Misc queries) 1 April 24th 09 05:32 PM
apostrophe and leading zeros Yvonne Excel Discussion (Misc queries) 3 April 8th 09 01:44 PM
Leading Apostrophe [email protected] Excel Worksheet Functions 3 September 10th 08 07:36 AM


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