Thread: my Franken-code
View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.programming
justme justme is offline
external usenet poster
 
Posts: 68
Default my Franken-code

Thanx for the explanations,
That was driving me crazy!

You are an angel

;)

jeny

"Neily" wrote:

I think the quote mark issue is because if you put quotemarks inside a set of
quotemarks, you have to double them up. Hence the double quote in the middle
is the representation of a single ".

ie It you write code to put a formula into a cell it goes like this...
ActiveCell.Formula="=TEXT(NOW(),""dd-mmm-yyyy"")"

When you run this, it converts the double "s into singles on the worksheet.

"justme" wrote:


Okay,

I tried this and it partially works, though I don't know why, because I did
use 4 quote marks even though I think I should only need 3:


Sub Macro13()
'
' Macro13 Macro
' Macro recorded 12/5/2006 by jeny
'
' Keyboard Shortcut: Ctrl+q
'
Do
Cells.Select
Range("A63").Activate
Selection.Find(What:="""", After:=ActiveCell, LookIn:=xlFormulas,
LookAt _
:=xlPart, SearchOrder:=xlByRows, SearchDirection:=xlNext,
MatchCase:= _
False, SearchFormat:=False).Activate
ActiveCell.FormulaR1C1 = "=R[-1]C"
Loop
End Sub


It seems to replace single quotes, but I get this error:
"Run-time error '91': Object Variable or With Block variable not set"
Also, the shortcut doesn't work.

??