看板 Visual_Basic 關於我們 聯絡資訊
If ComboBox4.SelectedIndex = 0 Then '隊形判斷式 密集隊形 If cnts = 1 Then '梯次判斷1梯次 If ComboBox1.SelectedIndex = 0 Then '速度16km/hr If cars < 25 Then '判斷車數判斷 walkturn = cars * 0.021 Else walkturn = cars * 0.031 End If End If If ComboBox1.SelectedIndex = 1 Then '速度24km/hr If cars < 25 Then '判斷車數 walkturn = cars * 0.048 Else walkturn = cars * 0.071 End If End If End If 寫了一個車子行進的數率表 研判車速16h/km 車子小於25輛 計算 cars*0.021 反之 大於25輛cars*0.031 研判車速24h/km 車子小於25輛 計算 cars*0.048 反之 大於25輛cars*0.071 以上.... 如果我要加上時間限制 早上時間06:00-17:59 指定時速24km 晚上時間18:00-05:59 指定時速16km 這樣要怎麼寫? 請麻煩各位指導.... -- ※ 發信站: 批踢踢實業坊(ptt.cc), 來自: 42.73.101.192 ※ 文章網址: https://www.ptt.cc/bbs/Visual_Basic/M.1457601472.A.ABC.html
MOONRAKER: 就再拉一個combobox 裡面放時間 if再加一層啦 03/10 22:35
MOONRAKER: 如果你覺得跟你想的不一樣 那是因為沒人知道你在想什麼 03/10 22:35
newkoks: 嗯嗯,試試看,謝謝指導 03/11 00:17