[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4756: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3887)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4758: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3887)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4759: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3887)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4760: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3887)
電腦觀點-初學者討論區 • 檢視主題 - 關於Excel VB的問題

關於Excel VB的問題

有了軟體不會用?設定好難?來這裡問就對了

版主: hammer, baga80

關於Excel VB的問題

文章yesorno2006 » 週一 3月 22, 2010 9:25 pm

版主,您好,我是一個程式的初學者,在excel中,用別人教我的方法寫了以下的程式碼,可是我發現執行的速度變得很慢,請問,有沒有解決的辦法呢?

說明1:我因為工作之故,必須將C17儲存格的內容自動變為我輸入C9儲存格的內容,其餘的就類推。
說明2:寫好的程式碼在以下。

麻煩版主幫幫我,我真得很急,再次感謝。


Private Sub Worksheet_SelectionChange(ByVal Target As Range)

Range("C17").Value = Range("C9")
Range("E17").Value = Range("E9")
Range("G17").Value = Range("G9")
Range("I17").Value = Range("I9")
Range("K17").Value = Range("K9")
Range("M17").Value = Range("M9")
Range("O17").Value = Range("O9")
Range("Q17").Value = Range("Q9")
Range("S17").Value = Range("S9")
Range("U17").Value = Range("U9")
Range("W17").Value = Range("W9")
Range("Z17").Value = Range("Z9")

Range("C20").Value = Range("C12")
Range("E20").Value = Range("E12")
Range("G20").Value = Range("G12")
Range("I20").Value = Range("I12")
Range("K20").Value = Range("K12")
Range("M20").Value = Range("M12")
Range("O20").Value = Range("O12")
Range("Q20").Value = Range("Q12")
Range("S20").Value = Range("S12")
Range("U20").Value = Range("U12")
Range("W20").Value = Range("W12")
Range("Z20").Value = Range("Z12")

End Sub
yesorno2006
一般會員
一般會員
 
文章: 8
註冊時間: 週六 1月 26, 2008 12:01 am

excel

文章Dora » 週六 3月 27, 2010 1:18 am

若不用巨集,可直接在c17輸入"=c9"即可(E17儲存格輸入=E9,餘類推),或用複製/貼上連結即可.

或原巨集換個表達方式看看
Cells(17, 3).Value = Range("c9")
Cells(17, 5).Value = Range("E9")
.
.
.
...那年的茉莉
乾枯地 躺在你送給我的鉛筆盒裡
變了顏色 換了模樣 像 你我的人生...
http://tw.myblog.yahoo.com/jia-425
頭像
Dora
教學群
教學群
 
文章: 26
註冊時間: 週五 12月 22, 2006 11:16 pm
來自: 網路公海


回到 各類軟體使用討論

誰在線上

正在瀏覽這個版面的使用者:沒有註冊會員 和 1 位訪客

cron