[]

Excel Kod
Sevgili Excel VBA gurulari!
soyle ki:
dim season as integer
season = month(DateSerial(Right(Worksheets("new safety calculation").Cells(1, x + 3).Value, 4), 1, -2) - Weekday(DateSerial(Right(Worksheets("new safety calculation").Cells(1, x + 3).Value, 4), 1, 3)) + Mid(Worksheets("new safety calculation").Cells(1, x + 3).Value, 3, 2) * 7)
seklinde bir kodum var ve type mismatch hatasi veriyor. Bir yerde integer veya string uyumsuzlugu var ama nasil duzeltecegimi bilmiyorum. Yardimci olabilecek var mi?
Tesekkurler selamlar!
soyle ki:
dim season as integer
season = month(DateSerial(Right(Worksheets("new safety calculation").Cells(1, x + 3).Value, 4), 1, -2) - Weekday(DateSerial(Right(Worksheets("new safety calculation").Cells(1, x + 3).Value, 4), 1, 3)) + Mid(Worksheets("new safety calculation").Cells(1, x + 3).Value, 3, 2) * 7)
seklinde bir kodum var ve type mismatch hatasi veriyor. Bir yerde integer veya string uyumsuzlugu var ama nasil duzeltecegimi bilmiyorum. Yardimci olabilecek var mi?
Tesekkurler selamlar!

dim season
season = month(DateSerial(Right(Worksheets("new safety calculation").Cells(1, x + 3).Value, 4), 1, -2) - Weekday(DateSerial(Right(Worksheets("new safety calculation").Cells(1, x + 3).Value, 4), 1, 3)) + Mid(Worksheets("new safety calculation").Cells(1, x + 3).Value, 3, 2) * 7)
aynı zamanda bu değer bir integer üretir, x'e nasil bir deger atiyorsun ?
season = month(DateSerial(Right(Worksheets("new safety calculation").Cells(1, x + 3).Value, 4), 1, -2) - Weekday(DateSerial(Right(Worksheets("new safety calculation").Cells(1, x + 3).Value, 4), 1, 3)) + Mid(Worksheets("new safety calculation").Cells(1, x + 3).Value, 3, 2) * 7)
aynı zamanda bu değer bir integer üretir, x'e nasil bir deger atiyorsun ?
- akiskan
(09.07.12 21:43:14 ~ 21:53:06)

x e de integer demisim for dongusunde kullaniyorum. Ancak neden type mismatch hatasi veriyor ya da bir duzeltme yolu var mi?
- schokopudding
(09.07.12 23:06:11)

Dim season
Bu calişiyor, hucreye atadigin deger tarih degilse type mismatch aliyorsundur. Tum kolonun formatini tarihe cevirdin mi ?
Bu calişiyor, hucreye atadigin deger tarih degilse type mismatch aliyorsundur. Tum kolonun formatini tarihe cevirdin mi ?
- akiskan
(10.07.12 08:16:46)
1