Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 354
Default Error data mismatch ??


Hi

I am working on programing VBA to make PatternDarkUpwardDiagonal of my bar
chart if date in range Rng7 more than 3 days

But I have error of date mismatch of S

Below is my code

Need your help to figure out the problem

Thanks
Daniel

'''''''''''''''''''''''''''''''''''''''''''''''''' '''''''''''''''''''''''''''''''''''''''''''''''''' ''''''''''''''''''''''''''''''''''''''''''''''
Dim Rng7 as range
Dim S as integer
Dim Cnt7 as integer

For Each Rng7 In Range(.Cells(2, 6), .Cells(20, 6))

Set Pts = ActiveChart.SeriesCollection(1).Points(Cnt7)

Pts.HasDataLabel = True


S = DateDiff("d", Now, Rng7.Value)


If S 3 Then

Pts.Fill.Patterned Pattern:=msoPatternDarkUpwardDiagonal

End If
Cnt7 = Cnt7 + 1

Next Rng7
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 9,101
Default Error data mismatch ??

I tried to duplicate your error and can't get the same error message with
excel 2003. Tried with diffeent types of erros and only get an overflow
error. I also noticed you don't have Cnt7 set to any value.

"Daniel" wrote:


Hi

I am working on programing VBA to make PatternDarkUpwardDiagonal of my bar
chart if date in range Rng7 more than 3 days

But I have error of date mismatch of S

Below is my code

Need your help to figure out the problem

Thanks
Daniel

'''''''''''''''''''''''''''''''''''''''''''''''''' '''''''''''''''''''''''''''''''''''''''''''''''''' ''''''''''''''''''''''''''''''''''''''''''''''
Dim Rng7 as range
Dim S as integer
Dim Cnt7 as integer

For Each Rng7 In Range(.Cells(2, 6), .Cells(20, 6))

Set Pts = ActiveChart.SeriesCollection(1).Points(Cnt7)

Pts.HasDataLabel = True


S = DateDiff("d", Now, Rng7.Value)


If S 3 Then

Pts.Fill.Patterned Pattern:=msoPatternDarkUpwardDiagonal

End If
Cnt7 = Cnt7 + 1

Next Rng7

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 354
Default Error data mismatch ??

Dim Cnt7 as integer

Don't know that if i change
Rng7.Value to Rng7.dataseries will work or not

Thanks
Daniel

"Joel" wrote:

I tried to duplicate your error and can't get the same error message with
excel 2003. Tried with diffeent types of erros and only get an overflow
error. I also noticed you don't have Cnt7 set to any value.

"Daniel" wrote:


Hi

I am working on programing VBA to make PatternDarkUpwardDiagonal of my bar
chart if date in range Rng7 more than 3 days

But I have error of date mismatch of S

Below is my code

Need your help to figure out the problem

Thanks
Daniel

'''''''''''''''''''''''''''''''''''''''''''''''''' '''''''''''''''''''''''''''''''''''''''''''''''''' ''''''''''''''''''''''''''''''''''''''''''''''
Dim Rng7 as range
Dim S as integer
Dim Cnt7 as integer

For Each Rng7 In Range(.Cells(2, 6), .Cells(20, 6))

Set Pts = ActiveChart.SeriesCollection(1).Points(Cnt7)

Pts.HasDataLabel = True


S = DateDiff("d", Now, Rng7.Value)


If S 3 Then

Pts.Fill.Patterned Pattern:=msoPatternDarkUpwardDiagonal

End If
Cnt7 = Cnt7 + 1

Next Rng7

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 354
Default Error data mismatch ??

Cnt7=1 was set

"Joel" wrote:

I tried to duplicate your error and can't get the same error message with
excel 2003. Tried with diffeent types of erros and only get an overflow
error. I also noticed you don't have Cnt7 set to any value.

"Daniel" wrote:


Hi

I am working on programing VBA to make PatternDarkUpwardDiagonal of my bar
chart if date in range Rng7 more than 3 days

But I have error of date mismatch of S

Below is my code

Need your help to figure out the problem

Thanks
Daniel

'''''''''''''''''''''''''''''''''''''''''''''''''' '''''''''''''''''''''''''''''''''''''''''''''''''' ''''''''''''''''''''''''''''''''''''''''''''''
Dim Rng7 as range
Dim S as integer
Dim Cnt7 as integer

For Each Rng7 In Range(.Cells(2, 6), .Cells(20, 6))

Set Pts = ActiveChart.SeriesCollection(1).Points(Cnt7)

Pts.HasDataLabel = True


S = DateDiff("d", Now, Rng7.Value)


If S 3 Then

Pts.Fill.Patterned Pattern:=msoPatternDarkUpwardDiagonal

End If
Cnt7 = Cnt7 + 1

Next Rng7

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
data type mismatch error Daniel Excel Programming 4 December 22nd 07 12:32 AM
Data Mismatch Error when adding 2 new fields Lythandra Excel Programming 0 December 5th 06 09:14 PM
Conditional Formatting - Run Time Error '13' Type Mismatch Error ksp Excel Programming 0 July 11th 06 07:06 AM
Type Mismatch Error when getting data from another workbook Tony Zappal Excel Programming 2 January 12th 05 10:29 PM
Copying data to another worksheet gives "Type Mismatch" error TB[_3_] Excel Programming 6 July 28th 03 12:44 PM


All times are GMT +1. The time now is 04:34 AM.

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"