Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 32
Default simple... HasFormula ?

please... what's my error?

Dim sglEndSum As Single

If Range("D" & sglEndSum).HasFormula = True Then
MsgBox Range("D" & sglEndSum).Address & " contains a formula..."
Range("D" & sglEndSum).Value = "not any more !"
End If


thanks in advance,
mark


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 718
Default simple... HasFormula ?

Since rows can reach up to 65536:
Dim sglEndSum As Long

But this does not keep your code from running OK by me.

HTH
--
AP

"mark kubicki" a écrit dans le message de news:
...
please... what's my error?

Dim sglEndSum As Single

If Range("D" & sglEndSum).HasFormula = True Then
MsgBox Range("D" & sglEndSum).Address & " contains a
formula..."
Range("D" & sglEndSum).Value = "not any more !"
End If


thanks in advance,
mark



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 32
Default simple... HasFormula ?

I'm getting a

method 'range' of object _worksheet failed

message

-m.

"Ardus Petus" wrote in message
...
Since rows can reach up to 65536:
Dim sglEndSum As Long

But this does not keep your code from running OK by me.

HTH
--
AP

"mark kubicki" a écrit dans le message de news:
...
please... what's my error?

Dim sglEndSum As Single

If Range("D" & sglEndSum).HasFormula = True Then
MsgBox Range("D" & sglEndSum).Address & " contains a
formula..."
Range("D" & sglEndSum).Value = "not any more !"
End If


thanks in advance,
mark





  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 718
Default simple... HasFormula ?

With debugger, check the value of sglEndSum. Maybe it is zero.

--
AP

"mark kubicki" a écrit dans le message de news:
...
I'm getting a

method 'range' of object _worksheet failed

message

-m.

"Ardus Petus" wrote in message
...
Since rows can reach up to 65536:
Dim sglEndSum As Long

But this does not keep your code from running OK by me.

HTH
--
AP

"mark kubicki" a écrit dans le message de
news: ...
please... what's my error?

Dim sglEndSum As Single

If Range("D" & sglEndSum).HasFormula = True Then
MsgBox Range("D" & sglEndSum).Address & " contains a
formula..."
Range("D" & sglEndSum).Value = "not any more !"
End If


thanks in advance,
mark







  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 216
Default simple... HasFormula ?

Also you don't need to test = True

If Range("D" & sglEndSum).HasFormula Then


--
HTH

Bob Phillips

(remove xxx from email address if mailing direct)

"Ardus Petus" wrote in message
...
With debugger, check the value of sglEndSum. Maybe it is zero.

--
AP

"mark kubicki" a écrit dans le message de news:
...
I'm getting a

method 'range' of object _worksheet failed

message

-m.

"Ardus Petus" wrote in message
...
Since rows can reach up to 65536:
Dim sglEndSum As Long

But this does not keep your code from running OK by me.

HTH
--
AP

"mark kubicki" a écrit dans le message de
news: ...
please... what's my error?

Dim sglEndSum As Single

If Range("D" & sglEndSum).HasFormula = True Then
MsgBox Range("D" & sglEndSum).Address & " contains a
formula..."
Range("D" & sglEndSum).Value = "not any more !"
End If


thanks in advance,
mark











  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 32
Default simple... HasFormula ?

it had been "zero-ing out"... thanks



"Bob Phillips" wrote in message
...
Also you don't need to test = True

If Range("D" & sglEndSum).HasFormula Then


--
HTH

Bob Phillips

(remove xxx from email address if mailing direct)

"Ardus Petus" wrote in message
...
With debugger, check the value of sglEndSum. Maybe it is zero.

--
AP

"mark kubicki" a écrit dans le message de
news:
...
I'm getting a

method 'range' of object _worksheet failed

message

-m.

"Ardus Petus" wrote in message
...
Since rows can reach up to 65536:
Dim sglEndSum As Long

But this does not keep your code from running OK by me.

HTH
--
AP

"mark kubicki" a écrit dans le message de
news: ...
please... what's my error?

Dim sglEndSum As Single

If Range("D" & sglEndSum).HasFormula = True Then
MsgBox Range("D" & sglEndSum).Address & " contains a
formula..."
Range("D" & sglEndSum).Value = "not any more !"
End If


thanks in advance,
mark











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
Simple problem, simple formula, no FUNCTION ! Ron@Buy Excel Worksheet Functions 6 September 28th 07 04:51 PM
Help with ActiveCell.HasFormula Paul Fenton[_2_] Excel Programming 0 April 20th 06 03:03 PM
HasFormula John Wirt[_12_] Excel Programming 1 February 7th 06 04:07 AM
Simple Simple Excel usage question BookerW Excel Discussion (Misc queries) 1 June 23rd 05 10:06 PM
HasFormula protect cell SIGE Excel Programming 7 May 19th 05 05:24 PM


All times are GMT +1. The time now is 12:39 AM.

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"