ªð¦^¦Cªí ¤W¤@¥DÃD µo©«

[µo°Ý] ¦h±i¤u§@ªí¥t¦s¬¡­¶Ã¯¤Î§ì¦í¹w³]±K½X

[µo°Ý] ¦h±i¤u§@ªí¥t¦s¬¡­¶Ã¯¤Î§ì¦í¹w³]±K½X

[µo°Ý] ¦h±i¤u§@ªí¥t¦s¬¡­¶Ã¯¤Î§ì¦í¹w³]±K½X
¦U¦ì±M®a
¥»¤H¥¿¾Ç²ßVBA, ½Ð°Ý¦p¦b¬¡­¶Ã¯¤º¦³3±i¤u§@ªí
²Ä1±i¤u§@ªí¦W¬°"PASSWORD",  ¤w¦C¥XA123ªºPASSWORD¦bB1, B456ªºPASSWORD¦bB2
²Ä2±i¤u§@ªí¦W¬°A123
²Ä3±i¤u§@ªí¦W¬°B456

½Ð±ÐVBA¼gªk:
²Ä2±i¤u§@ªí¦W¬°A123¥t¦s¤@­Ó¦W¬°A123ªº¬¡­¶Ã¯,. ¨Ã¯à¨ú¤u§@ªí¦W"PASSWORD"¤ºªºB1¤ºªº¦¨¬°¬¡­¶Ã¯±K½X, ¨Ã¥u¦s¤å¦rªº­È¤Î®æ¦¡
²Ä3±i¤u§@ªí¦W¬°B456¥t¦s¤@­Ó¦W¬°B456ªº¬¡­¶Ã¯,. ¨Ã¯à¨ú¤u§@ªí¦W"PASSWORD"¤ºªºB2¤ºªº¦¨¬°¬¡­¶Ã¯±K½X, ¨Ã¥u¦s¤å¦rªº­È¤Î®æ¦¡

¦³労½ç±Ð!

ÁÂÁ ¾Ç²ß¨ì«Ü¦h ¹ïVB·s¤âªº§Ú¨Ó»¡

TOP

[ª©¥DºÞ²z¯d¨¥]
  • GBKEE(2014/1/4 19:40): µ{¦¡½X¥H§ó·s,¦A¸Õ¸Õ¬Ý

¦^´_ 36# GBKEE

¤j¤j±z¦n, °õ¦æ®É¥X²{"°õ¦æ¶¥¬q¿ù»~'429', ACTIVEX¤¸¥óµLªk²£¥Íª«¥ó", ½ÐÀ°¦£!:funk:

TOP

¥»©«³Ì«á¥Ñ GBKEE ©ó 2014-1-4 19:37 ½s¿è

¦^´_ 35# missbb
  1. Option Explicit
  2. Sub Ex2()
  3.     Dim f$, fd$, fs$, A As Range, Wb As Workbook
  4.     Set Wb = ThisWorkbook             '  ¬¡­¶Ã¯ :µ{¦¡½X©Ò¦bªº
  5.     fd = Wb.Path & "\"                       '  ¦sÀɪº¸ô®|
  6.     Application.DisplayAlerts = False
  7.     Application.ScreenUpdating = False
  8.     With Wb.Sheets("PASSWORD")
  9.         For Each A In .Range(.[A2], .[A2].End(xlDown))
  10.             f = CStr(A)
  11.             fs = fd & f & ".xls"
  12.             Wb.Sheets(f).UsedRange.Copy  '¥ÎCOPY
  13.             With Workbooks.Add(1)
  14.                 With .Sheets(1).Range("A1")
  15.                     .PasteSpecial xlPasteValues           '¶K¤W­È
  16.                     .PasteSpecial xlPasteColumnWidths     '¶K¤WÄæ¼e
  17.                     .PasteSpecial xlPasteFormats          '¶K¤W®æ¦¡
  18.                     '²Ä¤@­«:«OÅ@¤u§@ªí
  19.                     .Parent.Protect Password:="9999", DrawingObjects:=True, Contents:=True, Scenarios:=True
  20.                 End With
  21.                 '²Ä¤G­«:«OÅ@¬¡­¶Ã¯¨Ï¨ästructure(µ²ºc:¤u§@ªí¤£¥i§R¼W)¡C
  22.                 .Protect Password:="9999", structure:=True, Windows:=False
  23.                 '  FileFormat:=xlExcel8   Excel 2003ª©¥» 56; xlExcel12  version 12, or 14, or 15 = Excel 2007, or 2010, or 2013.
  24.                 '²Ä¤T­«: ­­¨î¨Ï¥ÎªÌ
  25.                 .SaveAs Filename:=fs, Password:=CStr(A.Offset(, 1)), WriteResPassword:=""   , FileFormat:=xlExcel8
  26.                 .Close 0   '  Ãö³¬  "D:\A123.xls" ¬¡­¶Ã¯¡B"D:\B456.xls" ¬¡­¶Ã¯¡C
  27.             End With           '  ¥¿¦¡µ²§ô (Ãö³¬)¡C
  28.         Next
  29.     End With
  30.     Application.DisplayAlerts = True
  31.     Application.ScreenUpdating = True
  32. End Sub
½Æ»s¥N½X
·P®¦ªº¤ß......(¦b³Â»¶®a±Ú°Q½×°Ï.¥Î¤ß¾Ç²ß·|¦³¶i¨Bªº)
¦ý¸ê·½µL­­,«á´©¦³­­,  ¤@¤Ñ1¤¸ªºÃÙ§U,¤H¤H¦³¯à¤O.

TOP

payas2.zip (16.14 KB) ¦^´_ 33# GBKEE

¤£¦n·N«ä, ¤w¸Ñ°£±K½X.

:L

TOP

¦^´_ 33# GBKEE


    payas.rar (35.22 KB)

¤j¤j¦n, ¤S¦³·s§xÃø.
(1)§Ú±NACTIVATEWORKBOOK PROTECT©ñ¤J, ¥t¦s·sÀɶ}±Ò«á¤[¤[¤£¯àÃö³¬. §Ú¬O·Q«OÅ@¤º®e¤£³Q¨Ï¥ÎªÌ§ó§ï, ¦ý¤Sµoı¥i¥H§ï.
(2) ²{¦b¥i¥H¶K¤W­È, ¦ý½Ð°Ý¦p¦ó¥i¥H±N®æ½u¤ÎÄæ¼e¤Î¼Æ¦r®æ¦¡¤@¨Ö¥t¦s·sÀÉ?

¦³³Ò½ç±Ð.

TOP

¦^´_ 32# missbb
¥u­n§A»{¬°¬¡­¶Ã¯©|¥¼«OÅ@®É³£¥i¥Îªº
  1. '«OÅ@¬¡­¶Ã¯¨Ï¨ä¤£³Q­×§ï¡C
  2. ActiveWorkbook.Protect Password:="9999", structure:=True, Windows:=True
½Æ»s¥N½X
·P®¦ªº¤ß......(¦b³Â»¶®a±Ú°Q½×°Ï.¥Î¤ß¾Ç²ß·|¦³¶i¨Bªº)
¦ý¸ê·½µL­­,«á´©¦³­­,  ¤@¤Ñ1¤¸ªºÃÙ§U,¤H¤H¦³¯à¤O.

TOP

¦^´_ 27# GBKEE

¦A½Ð°Ý¦pªG·Q¨C­ÓSHEET³£¥[¤J²Î¤@ªº«OÅ@¤u§@ªí±K½X(ÁקK¨Ï¥ÎªÌ§ó§ï, ¨Ï¥ÎªÌ¦ý¥i¥H¥t¦s·sÀɩΦC¦L), §Ú¬Ý¨ì¦³¤U¦C:
activeworkbook.protect password:"9999",structure:=true,windows:=true

½Ð°ÝÀ³©ñ¦b¦p¦³VBA½X¤º¨º­Ó¦ì¸m?

TOP

¦^´_ 30# c_c_lai

·P¿E©Ò¦³¨ó§Uªº¤j¤j, ·s¦~§Ö¼Ö.

TOP

¦^´_ 25# missbb
²×©ó¬ÝÀ´©p©Ò¥¬§½ªº¤½¦¡¤F¡AÁÂÁ©p¡I

TOP

        ÀR«ä¦Û¦b : ¯àµ½¥Î®É¶¡ªº¤H¡A¥²¯à´x´¤¦Û¤v§V¤Oªº¤è¦V¡C
ªð¦^¦Cªí ¤W¤@¥DÃD