Гость
Целевая тема:
Создать новую тему:
Автор:
Форумы / Visual Basic [игнор отключен] [закрыт для гостей] / Про VBA и Excel. / 4 сообщений из 4, страница 1 из 1
02.04.2009, 12:52
    #35908059
Batulla
Гость
Скрыть профиль Поместить в игнор-лист Сообщения автора в теме
Про VBA и Excel.
Привет всем. я про VBA и Excel.
У объекта Range есть метод Replace. как в этом методе сделать так чтобы он заменял только точное совпадение, т.е если заменяем param, тобы он заменял только ячейки с param, а не params, cr_params. А то бредятина какая то получается.
...
Рейтинг: 0 / 0
02.04.2009, 14:44
    #35908485
gjghjc
Участник
Скрыть профиль Поместить в игнор-лист Сообщения автора в теме
Про VBA и Excel.
Справка по Replace method as it applies to the Range object.Returns a Boolean indicating characters in cells within the specified range. Using this method doesn’t change either the selection or the active cell.

expression.Replace(What, Replacement, LookAt, SearchOrder, MatchCase, MatchByte, SearchFormat, ReplaceFormat)

expression Required. An expression that returns a Range object.

What Required Variant. The string you want Microsoft Excel to search for.

Replacement Required Variant. The replacement string.

LookAt Optional Variant. Can be one of the following XlLookAt constants: xlWhole or xlPart.

SearchOrder Optional Variant. Can be one of the following XlSearchOrder constants: xlByRows or xlByColumns.

MatchCase Optional Variant. True to make the search case sensitive.

MatchByte Optional Variant. You can use this argument only if you’ve selected or installed double-byte language support in Microsoft Excel. True to have double-byte characters match only double-byte characters. False to have double-byte characters match their single-byte equivalents.

SearchFormat Optional Variant. The search format for the method.

ReplaceFormat Optional Variant. The replace format for the method.

Remarks
The settings for LookAt, SearchOrder, MatchCase, and MatchByte are saved each time you use this method. If you don’t specify values for these arguments the next time you call the method, the saved values are used. Setting these arguments changes the settings in the Find dialog box, and changing the settings in the Find dialog box changes the saved values that are used if you omit the arguments. To avoid problems, set these arguments explicitly each time you use this method.



Обрати внимание на выделенное.



С уважением, Николай.
...
Рейтинг: 0 / 0
03.04.2009, 08:55
    #35909769
Batulla
Гость
Скрыть профиль Поместить в игнор-лист Сообщения автора в теме
Про VBA и Excel.
Спасибо!
...
Рейтинг: 0 / 0
03.04.2009, 09:47
    #35909847
Batulla
Гость
Скрыть профиль Поместить в игнор-лист Сообщения автора в теме
Про VBA и Excel.
Спасибо!
...
Рейтинг: 0 / 0
Форумы / Visual Basic [игнор отключен] [закрыт для гостей] / Про VBA и Excel. / 4 сообщений из 4, страница 1 из 1
Найденые пользователи ...
Разблокировать пользователей ...
Читали форум (0):
Пользователи онлайн (0):
x
x
Закрыть


Просмотр
0 / 0
Close
Debug Console [Select Text]