我正在反覆使用以下代碼。有沒有更好的選擇。如何一次替換多個字符串
Dim strtxt as string
strtxt = Replace(strtxt, "String1", "")
strtxt = Replace(strtxt, "String2", "")
strtxt = Replace(strtxt, "String3", "")
strtxt = Replace(strtxt, "String4", "")
strtxt = Replace(strtxt, "String5", "")
strtxt = Replace(strtxt, "String6", "")
strtxt = Replace(strtxt, "String7", "")
那麼你是不是該代碼是不合法的,因爲沒有')'。你的方式很清楚,並且和其他方式一樣好。 –
只是忘了。添加。你可以補充說。 – Rahul
目標是明確的代碼,明確它在做什麼。你的方式很棒。 –