Вопросы по COMОбъект("Excel.Application"); #221244


#0 by Bobroff
Есть несколько вопросов: 1. Как ячейке присвоить оформление границ, чтобы они были выделены, типа рамочки? 2. Как текст в ячейке выровнять по левому краю? 3. Какой параметр указать в Excel.ActiveWorkBook.SaveAs(ИмяФайла), чтобы , если файл с таким уже существует, он не спрашивал "Заменить ли его", а сам автоматически перезаписывал его?
#1 by asady
#2 by Bobroff
up
#3 by Bobroff
- а откуда ты узнал, что -4138 - это xlMedium??? где можно остальные паремерты посмотреть?
#4 by asady
макрос: начать запись-остановить запись - выполнить
#5 by oev
Я для этого раньше пользовался прогой "VBA Friend" можно найти по адресу Но она для 7-ки
#6 by Bobroff
- в макросе он их именует как xlThin и т.п... а как номер узнать?
#7 by asady
из наследия Скунки: function GetConst(strConst) export    if strConst = lower("xlDialogSetBackgroundPicturet")  then  return 492;    elsif strConst = lower("xlDialogAutoCorrect") then return 485;    elsif strConst = lower("xlDialogFileSharing") then return 481;    elsif strConst = lower("xlDialogVbaMakeAddin") then return 478;    elsif strConst = lower("xlDialogActiveCellFont") then return 476;    elsif strConst = lower("xlDialogFindFile") then return 475;    elsif strConst = lower("xlDialogProperties") then return 474;    elsif strConst = lower("xlDialogSummaryInfo") then return 474;    elsif strConst = lower("xlDialogScenarioMerge") then return 473;    elsif strConst = lower("xlDialogStandardWidth") then return 472;    elsif strConst = lower("xlDialogMailEditMailer") then return 470;    elsif strConst = lower("xlDialogSeriesOrder") then return 466;    elsif strConst = lower("xlDialogFormatChart") then return 465;    elsif strConst = lower("xlDialogErrorbarY") then return 464;    elsif strConst = lower("xlDialogErrorbarX") then return 463;    elsif strConst = lower("xlDialogSeriesY") then return 462;    elsif strConst = lower("xlDialogSeriesX") then return 461;    elsif strConst = lower("xlDialogSeriesAxes") then return 460;    elsif strConst = lower("xlDialogOptionsListsAdd") then return 458;    elsif strConst = lower("xlDialogSaveCopyAs") then return 456;    elsif strConst = lower("xlDialogFunctionWizard") then return 450;    elsif strConst = lower("xlDialogFilter") then return 447;    elsif strConst = lower("xlDialogPushbuttonProperties") then return 445;    elsif strConst = lower("xlDialogOpenText") then return 441;    elsif strConst = lower("xlDialogEditboxProperties") then return 438;    elsif strConst = lower("xlDialogListboxProperties") then return 437;    elsif strConst = lower("xlDialogLabelProperties") then return 436;    elsif strConst = lower("xlDialogCheckboxProperties") then return 435;    elsif strConst = lower("xlDialogPivotFieldUngroup") then return 434;    elsif strConst = lower("xlDialogPivotFieldGroup") then return 433;    elsif strConst = lower("xlDialogFormatCharttype") then return 423;    elsif strConst = lower("xlDialogTextToColumns") then return 422;    elsif strConst = lower("xlDialogPivotShowPages") then return 421;    elsif strConst = lower("xlDialogScrollbarProperties") then return 420;    elsif strConst = lower("xlDialogWorkbookProtect") then return 417;    elsif strConst = lower("xlDialogWorkbookTabSplit") then return 415;    elsif strConst = lower("xlDialogSubtotalCreate") then return 398;    elsif strConst = lower("xlDialogTabOrder") then return 394;    elsif strConst = lower("xlDialogChartAddData") then return 392;    elsif strConst = lower("xlDialogAddChartAutoformat") then return 390;    elsif strConst = lower("xlDialogGalleryCustom") then return 388;    elsif strConst = lower("xlDialogWorkbookName") then return 386;    elsif strConst = lower("xlDialogWorkbookUnhide") then return 384;    elsif strConst = lower("xlDialogMacroOptions") then return 382;    elsif strConst = lower("xlDialogFontProperties") then return 381;    elsif strConst = lower("xlDialogInsertTitle") then return 380;    elsif strConst = lower("xlDialogDataLabel") then return 379;    elsif strConst = lower("xlDialogMailNextLetter") then return 378;    elsif strConst = lower("xlDialogFilterAdvanced") then return 370;    elsif strConst = lower("xlDialogOptionsGeneral") then return 356;    elsif strConst = lower("xlDialogOptionsTransition") then return 355;    elsif strConst = lower("xlDialogWorkbookInsert") then return 354;    elsif strConst = lower("xlDialogChartTrend") then return 3504    elsif strConst = lower("xlDialogGalleryDoughnut") then return 344;    elsif strConst = lower("xlDialogInsertPicture") then return 342;    elsif strConst = lower("xlDialogMailLogon") then return 339;    elsif strConst = lower("xlDialogRoutingSlip") then return 3364    elsif strConst = lower("xlDialogVbaProcedureDefinition") then return 330;    elsif strConst = lower("xlDialogVbaInsertFile") then return 328    elsif strConst = lower("xlDialogOptionsChart") then return 325;    elsif strConst = lower("xlDialogAttachToolbars") then return 323;    elsif strConst = lower("xlDialogMenuEditor") then return 322;    elsif strConst = lower("xlDialogAddinManager") then return 321;    elsif strConst = lower("xlDialogOptionsView") then return 320;    elsif strConst = lower("xlDialogOptionsEdit") then return 319;    elsif strConst = lower("xlDialogOptionsCalculation") then return 318;    elsif strConst = lower("xlDialogPivotFieldProperties") then return 313;    elsif strConst = lower("xlDialogPivotTableWizard") then return 312;    elsif strConst = lower("xlDialogScenarioSummary") then return 311;    elsif strConst = lower("xlDialogScenarioEdit") then return 308;    elsif strConst = lower("xlDialogScenarioAdd") then return 307;    elsif strConst = lower("xlDialogScenarioCells") then return 305;    elsif strConst = lower("xlDialogWorkbookNew") then return 302;    elsif strConst = lower("xlDialogFillWorkgroup") then return 301;    elsif strConst = lower("xlDialogPlacement") then return 300;    elsif strConst = lower("xlDialogAssignToTool") then return 293;    elsif strConst = lower("xlDialogChartWizard") then return 288;    elsif strConst = lower("xlDialogSaveWorkspace") then return 285;    elsif strConst = lower("xlDialogWorkbookOptions") then return 284;    elsif strConst = lower("xlDialogWorkbookCopy") then return 283;    elsif strConst = lower("xlDialogWorkbookMove") then return 282;    elsif strConst = lower("xlDialogWorkbookAdd") then return 281;    elsif strConst = lower("xlDialogCustomizeToolbar") then return 276;    elsif strConst = lower("xlDialogGallery3dSurface") then return 273;    elsif strConst = lower("xlDialogGallery3dBar") then return 272;    elsif strConst = lower("xlDialogFormatAuto") then return 269;    elsif strConst = lower("xlDialogMove") then return 262;    elsif strConst = lower("xlDialogSize") then return 261;    elsif strConst = lower("xlDialogInsertObject") then return 259;    elsif strConst = lower("xlDialogZoom") then return 256;    elsif strConst = lower("xlDialogEditionOptions") then return 251;    elsif strConst = lower("xlDialogGalleryRadar") then return 249;    elsif strConst = lower("xlDialogDefineStyle") then return 229;    elsif strConst = lower("xlDialogEditSeries") then return 228;    elsif strConst = lower("xlDialogFormatOverlay") then return 226;    elsif strConst = lower("xlDialogFormatMain") then return 225;    elsif strConst = lower("xlDialogEditColor") then return 223;    elsif strConst = lower("xlDialogPrintPreview") then return 222;    elsif strConst = lower("xlDialogShowToolbar") then return 220;    elsif strConst = lower("xlDialogSubscribeTo") then return 218;    elsif strConst = lower("xlDialogCreatePublisher") then return 217;    elsif strConst = lower("xlDialogObjectProtection") then return 214;    elsif strConst = lower("xlDialogAssignToObject") then return 213;    elsif strConst = lower("xlDialogApplyStyle") then return 212;    elsif strConst = lower("xlDialogSaveNewObject") then return 208;    elsif strConst = lower("xlDialogObjectProperties") then return 207;    elsif strConst = lower("xlDialogShowDetail") then return 204;    elsif strConst = lower("xlDialogDemote") then return 203;    elsif strConst = lower("xlDialogPromote") then return 202;    elsif strConst = lower("xlDialogUpdateLink") then return 201;    elsif strConst = lower("xlDialogFillGroup") then return 200;    elsif strConst = lower("xlDialogWorkgroup") then return 199;    elsif strConst = lower("xlDialogGoalSeek") then return 198;    elsif strConst = lower("xlDialogView3d") then return 197;    elsif strConst = lower("xlDialogGallery3dPie") then return 196;    elsif strConst = lower("xlDialogGallery3dLine") then return 195;    elsif strConst = lower("xlDialogGallery3dColumn") then return 194;    elsif strConst = lower("xlDialogGallery3dArea") then return 193;    elsif strConst = lower("xlDialogSortSpecial") then return 192;    elsif strConst = lower("xlDialogConsolidate") then return 191;    elsif strConst = lower("xlDialogStandardFont") then return 190;    elsif strConst = lower("xlDialogSendMail") then return 189;    elsif strConst = lower("xlDialogOpenMail") then return 188;    elsif strConst = lower("xlDialogOverlayChartType") then return 186;    elsif strConst = lower("xlDialogMainChartType") then return 185;    elsif strConst = lower("xlDialogAppSize") then return 171;    elsif strConst = lower("xlDialogAppMove") then return 170;    elsif strConst = lower("xlDialogChangeLink") then return 166;    elsif strConst = lower("xlDialogColorPalette") then return 161;    elsif strConst = lower("xlDialogSetUpdateStatus") then return 159;    elsif strConst = lower("xlDialogNote") then return 154;    elsif strConst = lower("xlDialogFormatFont") then return 150;    elsif strConst = lower("xlDialogCopyChart") then return 147;    elsif strConst = lower("xlDialogSaveWorkbook") then return 145;    elsif strConst = lower("xlDialogOutline") then return 142;    elsif strConst = lower("xlDialogSplit") then return 137;    elsif strConst = lower("xlDialogReplaceFont") then return 134;    elsif strConst = lower("xlDialogApplyNames") then return 133;    elsif strConst = lower("xlDialogSelectSpecial") then return 132;    elsif strConst = lower("xlDialogFormulaReplace") then return 130;    elsif strConst = lower("xlDialogFormatSize") then return 129;    elsif strConst = lower("xlDialogFormatMove") then return 128;    elsif strConst = lower("xlDialogRowHeight") then return 127;    elsif strConst = lower("xlDialogNew") then return 119;    elsif strConst = lower("xlDialogDeleteFormat") then return 111;    elsif strConst = lower("xlDialogDeleteName") then return 110;    elsif strConst = lower("xlDialogCopyPicture") then return 108;    elsif strConst = lower("xlDialogActivate") then return 103;    elsif strConst = lower("xlDialogWorkspace") then return 95;    elsif strConst = lower("xlDialogUnhide") then return 94;    elsif strConst = lower("xlDialogParse") then return 91;    elsif strConst = lower("xlDialogFormatText") then return 89;    elsif strConst = lower("xlDialogFormatLegend") then return 88;    elsif strConst = lower("xlDialogScale") then return 87;    elsif strConst = lower("xlDialogOverlay") then return 86;    elsif strConst = lower("xlDialogMainChart") then return 85;    elsif strConst = lower("xlDialogPatterns") then return 84;    elsif strConst = lower("xlDialogAttachText") then return 80;    elsif strConst = lower("xlDialogAxes") then return 78;    elsif strConst = lower("xlDialogGridlines") then return 76;    elsif strConst = lower("xlDialogCombination") then return 73;    elsif strConst = lower("xlDialogGalleryScatter") then return 72;    elsif strConst = lower("xlDialogGalleryPie") then return 71;    elsif strConst = lower("xlDialogGalleryLine") then return 70;    elsif strConst = lower("xlDialogGalleryColumn") then return 69;    elsif strConst = lower("xlDialogGalleryBar") then return 68;    elsif strConst = lower("xlDialogGalleryArea") then return 67;    elsif strConst = lower("xlDialogFormulaFind") then return 64;    elsif strConst = lower("xlDialogFormulaGoto") then return 63;    elsif strConst = lower("xlDialogCreateNames") then return 62;    elsif strConst = lower("xlDialogDefineName") then return 61;    elsif strConst = lower("xlDialogInsert") then return 55;    elsif strConst = lower("xlDialogEditDelete") then return 54;    elsif strConst = lower("xlDialogPasteSpecial") then return 53;    elsif strConst = lower("xlDialogClear") then return 52;    elsif strConst = lower("xlDialogColumnWidth") then return 47;    elsif strConst = lower("xlDialogCellProtection") then return 46;    elsif strConst = lower("xlDialogBorder") then return 45;    elsif strConst = lower("xlDialogStyle") then return 44;    elsif strConst = lower("xlDialogAlignment") then return 43;    elsif strConst = lower("xlDialogFormatNumber") then return 42;    elsif strConst = lower("xlDialogTable") then return 41;    elsif strConst = lower("xlDialogDataSeries") then return 40;    elsif strConst = lower("xlDialogSort") then return 39;    elsif strConst = lower("xlDialogDataDelete") then return 36;    elsif strConst = lower("xlDialogExtract") then return 35;    elsif strConst = lower("xlDialogCalculation") then return 32;    elsif strConst = lower("xlDialogProtectDocument") then return 28;    elsif strConst = lower("xlDialogDisplay") then return 27;    elsif strConst = lower("xlDialogFont") then return 26;    elsif strConst = lower("xlDialogSetPrintTitles") then return 23;    elsif strConst = lower("xlDialogRun") then return 17;    elsif strConst = lower("xlDialogWindowMove") then return 14;    elsif strConst = lower("xlDialogWindowSize") then return 13;    elsif strConst = lower("xlDialogArrangeAll") then return 12;    elsif strConst = lower("xlDialogPrinterSetup") then return 9;    elsif strConst = lower("xlDialogPrint") then return 8;    elsif strConst = lower("xlDialogPageSetup") then return 7;    elsif strConst = lower("xlDialogFileDelete") then return 6;    elsif strConst = lower("xlDialogSaveAs") then return 5;    elsif strConst = lower("xlDialogOpenLinks") then return 2;    elsif strConst = lower("xlDialogOpen") then return 1;    elsif strConst = lower("xlZero") then return 2;    elsif strConst = lower("xlYes") then return 1;    elsif strConst = lower("xlYearCode") then return 19;    elsif strConst = lower("xlYear") then return 4;    elsif strConst = lower("xlY") then return 1;    elsif strConst = lower("xlXYScatter") then return -4169;    elsif strConst = lower("xlX") then return -4168;    elsif strConst = lower("xlWQ1") then return 34;    elsif strConst = lower("xlWPG") then return 3;    elsif strConst = lower("xlWorksheetShort") then return 5;    elsif strConst = lower("xlWorksheetCell") then return 3;    elsif strConst = lower("xlWorksheet4") then return 1;    elsif strConst = lower("xlWorksheet") then return -4167;    elsif strConst = lower("xlWorks2FarEast") then return 28;    elsif strConst = lower("xlWorkbookTab") then return 6;    elsif strConst = lower("xlWorkbook") then return 1;    elsif strConst = lower("xlWMF") then return 2;    elsif strConst = lower("xlWKS") then return 4;    elsif strConst = lower("xlWK3FM3") then return 32;    elsif strConst = lower("xlWK3") then return 15;    elsif strConst = lower("xlWK1FMT") then return 30;    elsif strConst = lower("xlWK1ALL") then return 31;    elsif strConst = lower("xlWK1") then return 5;    elsif strConst = lower("xlWJ2WD1") then return 14;    elsif strConst = lower("xlWindows") then return 2;    elsif strConst = lower("xlWide") then return 3;    elsif strConst = lower("xlWhole") then return 1;    elsif strConst = lower("xlWeekdayNameChars") then return 31;    elsif strConst = lower("xlWeekday") then return 2;    elsif strConst = lower("xlWatchPane") then return 11;    elsif strConst = lower("xlWait") then return 2;    elsif strConst = lower("xlVisible") then return 12;    elsif strConst = lower("xlVeryHidden") then return 2;    elsif strConst = lower("xlVertical") then return -4166;    elsif strConst = lower("xlVarP") then return -4165;    elsif strConst = lower("xlVar") then return -4164;    elsif strConst = lower("xlValues") then return -4163;    elsif strConst = lower("xlValue") then return 2;    elsif strConst = lower("xlVALU") then return 8;    elsif strConst = lower("xlUserResolution") then return 1;    elsif strConst = lower("xlUpward") then return -4171;    elsif strConst = lower("xlUpperCaseRowLetter") then return 6;    elsif strConst = lower("xlUpperCaseColumnLetter") then return 7;    elsif strConst = lower("xlUpdateSubscriber") then return 2;    elsif strConst = lower("xlUpdateState") then return 1;    elsif strConst = lower("xlUp") then return -4162;    elsif strConst = lower("xlTriangle") then return 3;    elsif strConst = lower("xlTransparent") then return 24    elsif strConst = lower("xlToRight") then return -4161;    elsif strConst = lower("xlTopToBottom") then return 1;    elsif strConst = lower("xlTop10Percent") then return 5;    elsif strConst = lower("xlTop10Items") then return 3;    elsif strConst = lower("xlTop") then return -4160;    elsif strConst = lower("xlToolbarButton") then return 2;    elsif strConst = lower("xlToolbar") then return 1;    elsif strConst = lower("xlToLeft") then return -4159;    elsif strConst = lower("xlTitleBar") then return 8;    elsif strConst = lower("xlTimeSeparator") then return 18;    elsif strConst = lower("xlTimeLeadingZero") then return 45;    elsif strConst = lower("xlTiled") then return 1;    elsif strConst = lower("xlTIF") then return 9;    elsif strConst = lower("xlThousandsSeparator") then return 4;    elsif strConst = lower("xlThin") then return 2;    elsif strConst = lower("xlThick") then return 4;    elsif strConst = lower("xlTextWindows") then return 20;    elsif strConst = lower("xlTextValues") then return 2;    elsif strConst = lower("xlTextPrinter") then return 36;    elsif strConst = lower("xlTextMSDOS") then return 21;    elsif strConst = lower("xlTextMac") then return 19;    elsif strConst = lower("xlTextBox") then return 16;    elsif strConst = lower("xlText") then return -4158;    elsif strConst = lower("xlTemplate") then return 17;    elsif strConst = lower("xlTableBody") then return 8;    elsif strConst = lower("xlSyllabary") then return 1;    elsif strConst = lower("xlSYLK") then return 2;    elsif strConst = lower("xlSum") then return -4157;    elsif strConst = lower("xlSubtract") then return 3;    elsif strConst = lower("xlSubscribers") then return 6;    elsif strConst = lower("xlSubscriber") then return 2;    elsif strConst = lower("xlStrict") then return 2;    elsif strConst = lower("xlStretch") then return 1;    elsif strConst = lower("xlStError") then return 4;    elsif strConst = lower("xlStDevP") then return -4156;    elsif strConst = lower("xlStDev") then return -4155;    elsif strConst = lower("xlStar") then return 5;    elsif strConst = lower("xlStandardSummary") then return 1;    elsif strConst = lower("xlStack") then return 2;    elsif strConst = lower("xlSquare") then return 1;    elsif strConst = lower("xlSortValues") then return 1;    elsif strConst = lower("xlSortLabels") then return 2;    elsif strConst = lower("xlSolid") then return 1;    elsif strConst = lower("xlSingleQuote") then return 2;    elsif strConst = lower("xlSingleAccounting") then return 4;    elsif strConst = lower("xlSingle") then return 2;    elsif strConst = lower("xlSimple") then return -4154;    elsif strConst = lower("xlShowValue") then return 2;    elsif strConst = lower("xlShowPercent") then return 3;    elsif strConst = lower("xlShowLabelAndPercent") then return 5;    elsif strConst = lower("xlShowLabel") then return 4;    elsif strConst = lower("xlShort") then return 1;    elsif strConst = lower("xlShared") then return 2;    elsif strConst = lower("xlSeries") then return 3;    elsif strConst = lower("xlSendPublisher") then return 2;    elsif strConst = lower("xlSemiGray75") then return 10;    elsif strConst = lower("xlSemiautomatic") then return 2;    elsif strConst = lower("xlSelect") then return 3;    elsif strConst = lower("xlSecondCode") then return 24;    elsif strConst = lower("xlSecondary") then return 2;    elsif strConst = lower("xlScreenSize") then return 1;    elsif strConst = lower("xlScreen") then return 1;    elsif strConst = lower("xlScale") then return 3;    elsif strConst = lower("xlRunningTotal") then return 5;    elsif strConst = lower("xlRTF") then return 4;    elsif strConst = lower("xlRowThenColumn") then return 1;    elsif strConst = lower("xlRowSeparator") then return 15;    elsif strConst = lower("xlRows") then return 1;    elsif strConst = lower("xlRowItem") then return 4;    elsif strConst = lower("xlRowHeader") then return -4153;    elsif strConst = lower("xlRowField") then return 1;    elsif strConst = lower("xlRoutingInProgress") then return 1;    elsif strConst = lower("xlRoutingComplete") then return 2;    elsif strConst = lower("xlRightBracket") then return 11;    elsif strConst = lower("xlRightBrace") then return 13;    elsif strConst = lower("xlRight") then return -4152;    elsif strConst = lower("xlRelRowAbsColumn") then return 34    elsif strConst = lower("xlRelative") then return 4;    elsif strConst = lower("xlReference") then return 4;    elsif strConst = lower("xlReadWrite") then return 2;    elsif strConst = lower("xlReadOnly") then return 3;    elsif strConst = lower("xlRadar") then return -4151;    elsif strConst = lower("xlR1C1") then return -4150;    elsif strConst = lower("xlPublishers") then return 5;    elsif strConst = lower("xlPublisher") then return 1;    elsif strConst = lower("xlProduct") then return -4149;    elsif strConst = lower("xlPrinter") then return 2;    elsif strConst = lower("xlPrimary") then return 1;    elsif strConst = lower("xlPrevious") then return 2;    elsif strConst = lower("xlPowerTalk") then return 2;    elsif strConst = lower("xlPower") then return 4;    elsif strConst = lower("xlPortrait") then return 1;    elsif strConst = lower("xlPolynomial") then return 3;    elsif strConst = lower("xlPlusValues") then return 2;    elsif strConst = lower("xlPlus") then return 9;    elsif strConst = lower("xlPLT") then return 12;    elsif strConst = lower("xlPlotArea") then return 19;    elsif strConst = lower("xlPlaceholders") then return 2;    elsif strConst = lower("xlPivotTable") then return -4148;    elsif strConst = lower("xlPie") then return 5;    elsif strConst = lower("xlPicture") then return -4147;    elsif strConst = lower("xlPICT") then return 1;    elsif strConst = lower("xlPIC") then return 11;    elsif strConst = lower("xlPercentOfTotal") then return 8;    elsif strConst = lower("xlPercentOfRow") then return 6;    elsif strConst = lower("xlPercentOfColumn") then return 7;    elsif strConst = lower("xlPercentOf") then return 3;    elsif strConst = lower("xlPercentDifferenceFrom") then return 4;    elsif strConst = lower("xlPercent") then return 2;    elsif strConst = lower("xlPCX") then return 10;    elsif strConst = lower("xlPCT") then return 13;    elsif strConst = lower("xlPart") then return 2;    elsif strConst = lower("xlPaperUser") then return 256;    elsif strConst = lower("xlPaperTabloid") then return 3;    elsif strConst = lower("xlPaperStatement") then return 6;    elsif strConst = lower("xlPaperQuarto") then return 15;    elsif strConst = lower("xlPaperNote") then return 18;    elsif strConst = lower("xlPaperLetterSmall") then return 2;    elsif strConst = lower("xlPaperLetter") then return 1;    elsif strConst = lower("xlPaperLegal") then return 5;    elsif strConst = lower("xlPaperLedger") then return 4;    elsif strConst = lower("xlPaperFolio") then return 14;    elsif strConst = lower("xlPaperFanfoldUS") then return 39;    elsif strConst = lower("xlPaperFanfoldStdGerman") then return 40;    elsif strConst = lower("xlPaperFanfoldLegalGerman") then return 41;    elsif strConst = lower("xlPaperExecutive") then return 7;    elsif strConst = lower("xlPaperEsheet") then return 26;    elsif strConst = lower("xlPaperEnvelopePersonal") then return 38;    elsif strConst = lower("xlPaperEnvelopeMonarch") then return 37;    elsif strConst = lower("xlPaperEnvelopeItaly") then return 36;    elsif strConst = lower("xlPaperEnvelopeDL") then return 27;    elsif strConst = lower("xlPaperEnvelopeC65") then return 32;    elsif strConst = lower("xlPaperEnvelopeC6") then return 31;    elsif strConst = lower("xlPaperEnvelopeC5") then return 28;    elsif strConst = lower("xlPaperEnvelopeC4") then return 30;    elsif strConst = lower("xlPaperEnvelopeC3") then return 29;    elsif strConst = lower("xlPaperEnvelopeB6") then return 35;    elsif strConst = lower("xlPaperEnvelopeB5") then return 34;    elsif strConst = lower("xlPaperEnvelopeB4") then return 33;    elsif strConst = lower("xlPaperEnvelope9") then return 19;    elsif strConst = lower("xlPaperEnvelope14") then return 23;    elsif strConst = lower("xlPaperEnvelope12") then return 22;    elsif strConst = lower("xlPaperEnvelope11") then return 21;    elsif strConst = lower("xlPaperEnvelope10") then return 20;    elsif strConst = lower("xlPaperDsheet") then return 25;    elsif strConst = lower("xlPaperCsheet") then return 24;    elsif strConst = lower("xlPaperB5") then return 13;    elsif strConst = lower("xlPaperB4") then return 12;    elsif strConst = lower("xlPaperA5") then return 11;    elsif strConst = lower("xlPaperA4Small") then return 10;    elsif strConst = lower("xlPaperA4") then return 9;    elsif strConst = lower("xlPaperA3") then return 8;    elsif strConst = lower("xlPaper11x17") then return 17;    elsif strConst = lower("xlPaper10x14") then return 16;    elsif strConst = lower("xlPageItem") then return 6;    elsif strConst = lower("xlPageHeader") then return 2;    elsif strConst = lower("xlPageField") then return 3;    elsif strConst = lower("xlOverThenDown") then return 2;    elsif strConst = lower("xlOutside") then return 3;    elsif strConst = lower("xlOtherSessionChanges") then return 3;    elsif strConst = lower("xlOr") then return 2;    elsif strConst = lower("xlOpenSource") then return 3;    elsif strConst = lower("xlOpen") then return 2;    elsif strConst = lower("xlOpaque") then return 3;    elsif strConst = lower("xlOneAfterAnother") then return 1;    elsif strConst = lower("xlOn") then return 1;    elsif strConst = lower("xlOLELinks") then return 2;    elsif strConst = lower("xlOLELink") then return 0;    elsif strConst = lower("xlOLEEmbed") then return 1;    elsif strConst = lower("xlOff") then return -4146;    elsif strConst = lower("xlNumbers") then return 1;    elsif strConst = lower("xlNumber") then return -4145;    elsif strConst = lower("xlNotYetRouted") then return 0;    elsif strConst = lower("xlNotPlotted") then return 1;    elsif strConst = lower("xlNotes") then return -4144;    elsif strConst = lower("xlNoShapeChanges") then return 2;    elsif strConst = lower("xlNorthwestArrow") then return 1;    elsif strConst = lower("xlNormal") then return -4143;    elsif strConst = lower("xlNonEnglishFunctions") then return 34;    elsif strConst = lower("xlNone") then return -4142;    elsif strConst = lower("xlNoncurrencyDigits") then return 29;    elsif strConst = lower("xlNoMailSystem") then return 0;    elsif strConst = lower("xlNoDocuments") then return 3;    elsif strConst = lower("xlNoDockingChanges") then return 3;    elsif strConst = lower("xlNoChanges") then return 4;    elsif strConst = lower("xlNoChange") then return 14    elsif strConst = lower("xlNoCap") then return 2;    elsif strConst = lower("xlNoButtonChanges") then return 1;    elsif strConst = lower("xlNo") then return 2;    elsif strConst = lower("xlNextToAxis") then return 4;    elsif strConst = lower("xlNext") then return 1;    elsif strConst = lower("xlNarrow") then return 1;    elsif strConst = lower("xlMultiply") then return 4;    elsif strConst = lower("xlMSDOS") then return 3;    elsif strConst = lower("xlMovingAvg") then return 6;    elsif strConst = lower("xlMoveAndSize") then return 1;    elsif strConst = lower("xlMove") then return 2;    elsif strConst = lower("xlMonthNameChars") then return 30;    elsif strConst = lower("xlMonthLeadingZero") then return 41;    elsif strConst = lower("xlMonthCode") then return 20;    elsif strConst = lower("xlMonth") then return 3;    elsif strConst = lower("xlModule") then return -4141;    elsif strConst = lower("xlMixed") then return 2;    elsif strConst = lower("xlMinuteCode") then return 23;    elsif strConst = lower("xlMinusValues") then return 3;    elsif strConst = lower("xlMinimum") then return 2;    elsif strConst = lower("xlMinimized") then return -4140;    elsif strConst = lower("xlMin") then return -4139;    elsif strConst = lower("xlMicrosoftWord") then return 1;    elsif strConst = lower("xlMicrosoftSchedulePlus") then return 7;    elsif strConst = lower("xlMicrosoftProject") then return 6;    elsif strConst = lower("xlMicrosoftPowerPoint") then return 2;    elsif strConst = lower("xlMicrosoftMail") then return 3;    elsif strConst = lower("xlMicrosoftFoxPro") then return 5;    elsif strConst = lower("xlMicrosoftAccess") then return 4;    elsif strConst = lower("xlMetric") then return 35;    elsif strConst = lower("xlMedium") then return -4138;    elsif strConst = lower("xlMDY") then return 44;    elsif strConst = lower("xlMaximum") then return 2;    elsif strConst = lower("xlMaximized") then return -4137;    elsif strConst = lower("xlMax") then return -4136;    elsif strConst = lower("xlMAPI") then return 1;    elsif strConst = lower("xlManualUpdate") then return 5;    elsif strConst = lower("xlManual") then return -4135;    elsif strConst = lower("xlMacrosheetCell") then return 7;    elsif strConst = lower("xlMacintosh") then return 1;
#8 by Bobroff
..рекомендую в книгу знаний!!! А что по поводу вопросы №2 и №3?
#9 by oev
При использовании "VBA Friend" xlMedium переводится в -4138
#10 by Bobroff
- докончи список
#11 by asady
2) Worksheet.Range(текЯч).HorizontalAlignment=xlToLeft;
#12 by asady
elsif strConst = lower("xlLowerCaseRowLetter") then return 8;    elsif strConst = lower("xlLowerCaseColumnLetter") then return 9;    elsif strConst = lower("xlLow") then return -4134;    elsif strConst = lower("xlLotusHelp") then return 2;    elsif strConst = lower("xlLong") then return 3;    elsif strConst = lower("xlLogical") then return 4;    elsif strConst = lower("xlLogarithmic") then return -4133;    elsif strConst = lower("xlLocalSessionChanges") then return 2;    elsif strConst = lower("xlLocalFormat2") then return 16;    elsif strConst = lower("xlLocalFormat1") then return 15;    elsif strConst = lower("xlListSeparator") then return 5;    elsif strConst = lower("xlList3") then return 12;    elsif strConst = lower("xlList2") then return 11;    elsif strConst = lower("xlList1") then return 10;    elsif strConst = lower("xlLinearTrend") then return 9;    elsif strConst = lower("xlLinear") then return -4132;    elsif strConst = lower("xlLine") then return 4;    elsif strConst = lower("xlLightVertical") then return 12;    elsif strConst = lower("xlLightUp") then return 14;    elsif strConst = lower("xlLightHorizontal") then return 11;    elsif strConst = lower("xlLightDown") then return 13;    elsif strConst = lower("xlLegend") then return 24;    elsif strConst = lower("xlLeftToRight") then return 2;    elsif strConst = lower("xlLeftBracket") then return 10;    elsif strConst = lower("xlLeftBrace") then return 12;    elsif strConst = lower("xlLeft") then return -4131;    elsif strConst = lower("xlLastCell") then return 11;    elsif strConst = lower("xlLast") then return 1;    elsif strConst = lower("xlLandscape") then return 2;    elsif strConst = lower("xlJustify") then return -4130;    elsif strConst = lower("xlIntlMacro") then return 25;    elsif strConst = lower("xlIntlAddIn") then return 26;    elsif strConst = lower("xlInterrupt") then return 1;    elsif strConst = lower("xlInterpolated") then return 3;    elsif strConst = lower("xlInteger") then return 2;    elsif strConst = lower("xlInside") then return 2;    elsif strConst = lower("xlInfo") then return -4129;    elsif strConst = lower("xlIndex") then return 9;    elsif strConst = lower("xlImmediatePane") then return 12;    elsif strConst = lower("xlIcons") then return 1;    elsif strConst = lower("xlIBeam") then return 3;    elsif strConst = lower("xlHourCode") then return 22;    elsif strConst = lower("xlHorizontal") then return -4128;    elsif strConst = lower("xlHigh") then return -4127;    elsif strConst = lower("xlHide") then return 3;    elsif strConst = lower("xlHidden") then return 0;    elsif strConst = lower("xlHGL") then return 6;    elsif strConst = lower("xlHairline") then return 1;    elsif strConst = lower("xlGuess") then return 0;    elsif strConst = lower("xlGrowthTrend") then return 10;    elsif strConst = lower("xlGrowth") then return 2;    elsif strConst = lower("xlGridline") then return 22;    elsif strConst = lower("xlGrid") then return 15;    elsif strConst = lower("xlGray8") then return 18;    elsif strConst = lower("xlGray75") then return -4126;    elsif strConst = lower("xlGray50") then return -4125;    elsif strConst = lower("xlGray25") then return -4124;    elsif strConst = lower("xlGray16") then return 17;    elsif strConst = lower("xlGeneralFormatName") then return 26;    elsif strConst = lower("xlGeneral") then return 1;    elsif strConst = lower("xlFunction") then return 1;    elsif strConst = lower("xlFullPage") then return 3;    elsif strConst = lower("xlFreeFloating") then return 3;    elsif strConst = lower("xlFormulas") then return -4123;    elsif strConst = lower("xlFormula") then return 5;    elsif strConst = lower("xlFormats") then return -4122;    elsif strConst = lower("xlFloor") then return 23;    elsif strConst = lower("xlFloating") then return 5;    elsif strConst = lower("xlFixedWidth") then return 2;    elsif strConst = lower("xlFixedValue") then return 1;    elsif strConst = lower("xlFitToPage") then return 2;    elsif strConst = lower("xlFirst") then return 0;    elsif strConst = lower("xlFilterInPlace") then return 1;    elsif strConst = lower("xlFilterCopy") then return 2;    elsif strConst = lower("xlFillYears") then return 8;    elsif strConst = lower("xlFillWeekdays") then return 6;    elsif strConst = lower("xlFillValues") then return 4;    elsif strConst = lower("xlFillSeries") then return 2;    elsif strConst = lower("xlFillMonths") then return 7;    elsif strConst = lower("xlFillFormats") then return 3;    elsif strConst = lower("xlFillDefault") then return 0;    elsif strConst = lower("xlFillDays") then return 5;    elsif strConst = lower("xlFillCopy") then return 1;    elsif strConst = lower("xlFill") then return 5;    elsif strConst = lower("xlExternal") then return 2;    elsif strConst = lower("xlExtended") then return 3;    elsif strConst = lower("xlExponential") then return 5;    elsif strConst = lower("xlExclusive") then return 3;    elsif strConst = lower("xlExcelMenus") then return 1;    elsif strConst = lower("xlExcelLinks") then return 1;    elsif strConst = lower("xlExcel4Workbook") then return 35;    elsif strConst = lower("xlExcel4MacroSheet") then return 3;    elsif strConst = lower("xlExcel4IntlMacroSheet") then return 4;    elsif strConst = lower("xlExcel4") then return 33;    elsif strConst = lower("xlExcel3") then return 29;    elsif strConst = lower("xlExcel2FarEast") then return 27;    elsif strConst = lower("xlExcel2") then return 16;    elsif strConst = lower("xlErrValue") then return 2015;    elsif strConst = lower("xlErrRef") then return 2023;    elsif strConst = lower("xlErrors") then return 16;    elsif strConst = lower("xlErrorHandler") then return 2;    elsif strConst = lower("xlErrNum") then return 2036;    elsif strConst = lower("xlErrNull") then return 2000;    elsif strConst = lower("xlErrName") then return 2029;    elsif strConst = lower("xlErrNA") then return 2042;    elsif strConst = lower("xlErrDiv0") then return 2007;    elsif strConst = lower("xlEPS") then return 8;    elsif strConst = lower("xlEntireChart") then return 20;    elsif strConst = lower("xlEditionDate") then return 2;    elsif strConst = lower("xlDXF") then return 5;    elsif strConst = lower("xlDRW") then return 4;    elsif strConst = lower("xlDrawingObject") then return 14;    elsif strConst = lower("xlDownward") then return -4170;    elsif strConst = lower("xlDownThenOver") then return 1;    elsif strConst = lower("xlDown") then return -4121;    elsif strConst = lower("xlDoughnut") then return -4120;    elsif strConst = lower("xlDoubleQuote") then return 1;    elsif strConst = lower("xlDoubleOpen") then return 4;    elsif strConst = lower("xlDoubleClosed") then return 5;    elsif strConst = lower("xlDoubleAccounting") then return 5;    elsif strConst = lower("xlDouble") then return -4119;    elsif strConst = lower("xlDot") then return -4118;    elsif strConst = lower("xlDivide") then return 5;    elsif strConst = lower("xlDistributed") then return -4117;    elsif strConst = lower("xlDisabled") then return 0;    elsif strConst = lower("xlDirect") then return 1;    elsif strConst = lower("xlDifferenceFrom") then return 2;    elsif strConst = lower("xlDIF") then return 9;    elsif strConst = lower("xlDiamond") then return 2;    elsif strConst = lower("xlDialogSheet") then return -4116;    elsif strConst = lower("xlDesktop") then return 9;    elsif strConst = lower("xlDescending") then return 2;    elsif strConst = lower("xlDelimited") then return 1;    elsif strConst = lower("xlDefaultAutoFormat") then return -1;    elsif strConst = lower("xlDecimalSeparator") then return 3;    elsif strConst = lower("xlDebugCodePane") then return 13;    elsif strConst = lower("xlDBF4") then return 11;    elsif strConst = lower("xlDBF3") then return 8;    elsif strConst = lower("xlDBF2") then return 7;    elsif strConst = lower("xlDayLeadingZero") then return 42;    elsif strConst = lower("xlDayCode") then return 21;    elsif strConst = lower("xlDay") then return 1;    elsif strConst = lower("xlDateSeparator") then return 17;    elsif strConst = lower("xlDateOrder") then return 32;    elsif strConst = lower("xlDate") then return 2;    elsif strConst = lower("xlDataItem") then return 7;    elsif strConst = lower("xlDataHeader") then return 3;    elsif strConst = lower("xlDataField") then return 4;    elsif strConst = lower("xlDatabase") then return 1;    elsif strConst = lower("xlDashDotDot") then return 5;    elsif strConst = lower("xlDashDot") then return 4;    elsif strConst = lower("xlDash") then return -4115;    elsif strConst = lower("xlCut") then return 2;    elsif strConst = lower("xlCustom") then return -4114;    elsif strConst = lower("xlCurrencyTrailingZeros") then return 39;    elsif strConst = lower("xlCurrencySpaceBefore") then return 36;    elsif strConst = lower("xlCurrencyNegative") then return 28;    elsif strConst = lower("xlCurrencyMinusSign") then return 38;    elsif strConst = lower("xlCurrencyLeadingZeros") then return 40;    elsif strConst = lower("xlCurrencyDigits") then return 27;    elsif strConst = lower("xlCurrencyCode") then return 25;    elsif strConst = lower("xlCurrencyBefore") then return 37;    elsif strConst = lower("xlCSVWindows") then return 23;    elsif strConst = lower("xlCSVMSDOS") then return 24;    elsif strConst = lower("xlCSVMac") then return 22;    elsif strConst = lower("xlCSV") then return 6;    elsif strConst = lower("xlCross") then return 4;    elsif strConst = lower("xlCrissCross") then return 16;    elsif strConst = lower("xlCountrySetting") then return 2;    elsif strConst = lower("xlCountryCode") then return 1;    elsif strConst = lower("xlCountNums") then return -4113;    elsif strConst = lower("xlCount") then return -4112;    elsif strConst = lower("xlCorner") then return 2;    elsif strConst = lower("xlCopy") then return 1;    elsif strConst = lower("xlContinuous") then return 1;    elsif strConst = lower("xlContents") then return 2;    elsif strConst = lower("xlConsolidation") then return 3;    elsif strConst = lower("xlCommand") then return 2;    elsif strConst = lower("xlCombination") then return -4111;    elsif strConst = lower("xlColumnThenRow") then return 2;    elsif strConst = lower("xlColumnSeparator") then return 14;    elsif strConst = lower("xlColumns") then return 2;    elsif strConst = lower("xlColumnItem") then return 5;    elsif strConst = lower("xlColumnHeader") then return -4110;    elsif strConst = lower("xlColumnField") then return 2;    elsif strConst = lower("xlColumn") then return 3;    elsif strConst = lower("xlColor3") then return 9;    elsif strConst = lower("xlColor2") then return 8;    elsif strConst = lower("xlColor1") then return 7;    elsif strConst = lower("xlCodePage") then return 2;    elsif strConst = lower("xlClosed") then return 3;    elsif strConst = lower("xlClipboardFormatWK1") then return 10;    elsif strConst = lower("xlClipboardFormatVALU") then return 1;    elsif strConst = lower("xlClipboardFormatToolFacePICT") then return 26;    elsif strConst = lower("xlClipboardFormatToolFace") then return 25;    elsif strConst = lower("xlClipboardFormatText") then return 0;    elsif strConst = lower("xlClipboardFormatTable") then return 16;    elsif strConst = lower("xlClipboardFormatSYLK") then return 6;    elsif strConst = lower("xlClipboardFormatStandardScale") then return 27;    elsif strConst = lower("xlClipboardFormatStandardFont") then return 28;    elsif strConst = lower("xlClipboardFormatScreenPICT") then return 29;    elsif strConst = lower("xlClipboardFormatRTF") then return 7;    elsif strConst = lower("xlClipboardFormatPrintPICT") then return 3;    elsif strConst = lower("xlClipboardFormatPICT") then return 2;    elsif strConst = lower("xlClipboardFormatOwnerLink") then return 17;    elsif strConst = lower("xlClipboardFormatObjectLink") then return 19;    elsif strConst = lower("xlClipboardFormatObjectDesc") then return 31;    elsif strConst = lower("xlClipboardFormatNative") then return 14;    elsif strConst = lower("xlClipboardFormatMovie") then return 24;    elsif strConst = lower("xlClipboardFormatLinkSourceDesc") then return 32;    elsif strConst = lower("xlClipboardFormatLinkSource") then return 23;    elsif strConst = lower("xlClipboardFormatLink") then return 11;    elsif strConst = lower("xlClipboardFormatEmbedSource") then return 22;    elsif strConst = lower("xlClipboardFormatEmbeddedObject") then return 21;    elsif strConst = lower("xlClipboardFormatDspText") then return 12;    elsif strConst = lower("xlClipboardFormatDIF") then return 4;    elsif strConst = lower("xlClipboardFormatCSV") then return 5;    elsif strConst = lower("xlClipboardFormatCGM") then return 13;    elsif strConst = lower("xlClipboardFormatBitmap") then return 9;    elsif strConst = lower("xlClipboardFormatBinary") then return 15;    elsif strConst = lower("xlClipboardFormatBIFF4") then return 30;    elsif strConst = lower("xlClipboardFormatBIFF3") then return 20;    elsif strConst = lower("xlClipboardFormatBIFF2") then return 18;    elsif strConst = lower("xlClipboardFormatBIFF") then return 8;    elsif strConst = lower("xlClipboard") then return 3;    elsif strConst = lower("xlClassic3") then return 3;    elsif strConst = lower("xlClassic2") then return 2;    elsif strConst = lower("xlClassic1") then return 1;    elsif strConst = lower("xlCircle") then return 8;    elsif strConst = lower("xlChronological") then return 3;    elsif strConst = lower("xlChecker") then return 9;    elsif strConst = lower("xlChartTitles") then return 18;    elsif strConst = lower("xlChartShort") then return 6;    elsif strConst = lower("xlChartSeries") then return 17;    elsif strConst = lower("xlChartInPlace") then return 4;    elsif strConst = lower("xlChartAsWindow") then return 5;    elsif strConst = lower("xlChart4") then return 2;    elsif strConst = lower("xlChart") then return -4109;    elsif strConst = lower("xlChangeAttributes") then return 6;    elsif strConst = lower("xlCGM") then return 7;    elsif strConst = lower("xlCenterAcrossSelection") then return 7;    elsif strConst = lower("xlCenter") then return -4108;    elsif strConst = lower("xlCategory") then return 1;    elsif strConst = lower("xlCascade") then return 7;    elsif strConst = lower("xlCap") then return 1;    elsif strConst = lower("xlCancel") then return 1;    elsif strConst = lower("xlByRows") then return 1;    elsif strConst = lower("xlByColumns") then return 2;    elsif strConst = lower("xlButton") then return 15;    elsif strConst = lower("xlBuiltIn") then return 0;    elsif strConst = lower("xlBottom10Percent") then return 6;    elsif strConst = lower("xlBottom10Items") then return 4;    elsif strConst = lower("xlBottom") then return -4107;    elsif strConst = lower("xlBoth") then return 1;    elsif strConst = lower("xlBMP") then return 1;    elsif strConst = lower("xlBlanks") then return 4;    elsif strConst = lower("xlBitmap") then return 2;    elsif strConst = lower("xlBIFF") then return 2;    elsif strConst = lower("xlBelow") then return 1;    elsif strConst = lower("xlBar") then return 2;    elsif strConst = lower("xlAxis") then return 21;    elsif strConst = lower("xlAverage") then return -4106;    elsif strConst = lower("xlAutoOpen") then return 1;    elsif strConst = lower("xlAutomaticUpdate") then return 4;    elsif strConst = lower("xlAutomatic") then return -4105;    elsif strConst = lower("xlAutoFill") then return 4;    elsif strConst = lower("xlAutoDeactivate") then return 4;    elsif strConst = lower("xlAutoClose") then return 2;    elsif strConst = lower("xlAutoActivate") then return 3;    elsif strConst = lower("xlAscending") then return 1;    elsif strConst = lower("xlArea") then return 1;    elsif strConst = lower("xlAnd") then return 1;    elsif strConst = lower("xlAlternateArraySeparator") then return 16;    elsif strConst = lower("xlAllExceptBorders") then return 6;    elsif strConst = lower("xlAllAtOnce") then return 2;    elsif strConst = lower("xlAll") then return -4104;    elsif strConst = lower("xlAddIn") then return 18;    elsif strConst = lower("xlAdd") then return 2;    elsif strConst = lower("xlAccounting4") then return 17;    elsif strConst = lower("xlAccounting3") then return 6;    elsif strConst = lower("xlAccounting2") then return 5;    elsif strConst = lower("xlAccounting1") then return 4;    elsif strConst = lower("xlAbsRowRelColumn") then return 2;    elsif strConst = lower("xlAbsolute") then return 1;    elsif strConst = lower("xlAbove") then return 0;    elsif strConst = lower("xlA1") then return 1;    elsif strConst = lower("xl4DigitYears") then return 43;    elsif strConst = lower("xl3DSurface") then return -4103;    elsif strConst = lower("xl3DPie") then return -4102;    elsif strConst = lower("xl3DLine") then return -4101;    elsif strConst = lower("xl3DEffects2") then return 14;    elsif strConst = lower("xl3DEffects1") then return 13;    elsif strConst = lower("xl3DColumn") then return -4100;    elsif strConst = lower("xl3DBar") then return -4099;    elsif strConst = lower("xl3DArea") then return -4098;    elsif strConst = lower("xl24HourClock") then return 33;
#13 by Bobroff
А что по поводу вопрос №3?
#14 by shuhard
а ещё в Экселе  есть  VBA - alt+F11   и в нем Object Browser - F2   и в нем поиск    Const xlMedium = -4138 (&HFFFFEFD6)    Member of Excel.XlBorderWeight + объектная модель xls
#15 by asady
expression.SaveAs(FileName, FileFormat, Password, WriteResPassword, ReadOnlyRecommended, CreateBackup, AccessMode, ConflictResolution, AddToMru, TextCodepage, TextVisualLayout, Local) expression   Required. An expression that returns one of the above objects. Filename   Optional Variant. A string that indicates the name of the file to be saved. You can include a full path; if you don't, Microsoft Excel saves the file in the current folder. FileFormat   Optional Variant. The file format to use when you save the file. For a list of valid choices, see the FileFormat property. For an existing file, the default format is the last file format specified; for a new file, the default is the format of the version of Excel being used. Password   Optional Variant. A case-sensitive string (no more than 15 characters) that indicates the protection password to be given to the file. WriteResPassword   Optional Variant. A string that indicates the write-reservation password for this file. If a file is saved with the password and the password isn't supplied when the file is opened, the file is opened as read-only. ReadOnlyRecommended   Optional Variant. True to display a message when the file is opened, recommending that the file be opened as read-only. CreateBackup   Optional Variant. True to create a backup file. AccessMode  Optional XlSaveAsAccessMode. XlSaveAsAccessMode can be one of these XlSaveAsAccessMode constants. xlExclusive  (exclusive mode) xlNoChange default  (don't change the access mode) xlShared  (share list) If this argument is omitted, the access mode isn't changed. This argument is ignored if you save a shared list without changing the file name. To change the access mode, use the ExclusiveAccess method. ConflictResolution   Optional XlSaveConflictResolution. XlSaveConflictResolution can be one of these XlSaveConflictResolution constants. xlUserResolution  (display the conflict-resolution dialog box) xlLocalSessionChanges (automatically accept the local user's changes) xlOtherSessionChanges  (accept other changes instead of the local user's changes) If this argument is omitted, the conflict-resolution dialog box is displayed.
#16 by smaharbA
Ексель.DisplayAlert=0;
#17 by smaharbA
ConflictResolution это при совместном доступе
#18 by smaharbA
+ DisplayAlert ==> DisplayAlerts
#19 by Bobroff
При: Excel.Workbooks.WorkSheets.Range("A1:A50").HorizontalAlignment=-4159; почему то выдаёт ошибку: {ОбщийМодуль.Продажи}: Ошибка при установке значения атрибута контекста (HorizontalAlignment): Произошла исключительная ситуация (Microsoft Office Excel): Нельзя установить свойство HorizontalAlignment класса Range по причине: Произошла исключительная ситуация (Microsoft Office Excel): Нельзя установить свойство HorizontalAlignment класса Range
#20 by Bobroff
...хотя в хелпе явно написанно: Example This example left aligns the range A1:A5 on Sheet1. Worksheets("Sheet1").Range("A1:A5").HorizontalAlignment = xlLeft
#21 by asady
Excel.Workbooks.WorkSheets.Range("A1:A50").HorizontalAlignment=-4131; //!!!
Тэги:
Ответить:
Комментарии доступны только авторизированным пользователям