EXCEL ¬¡¶Ã¯SHEET1¸ê®Æ¤À¦Ü¤£¦P¬¡¶Ã¯
- ©«¤l
- 9
- ¥DÃD
- 4
- ºëµØ
- 0
- ¿n¤À
- 18
- ÂI¦W
- 0
- §@·~¨t²Î
- VISTA
- ³nÅ骩¥»
- office 2007
- ¾\ŪÅv
- 10
- µù¥U®É¶¡
- 2013-4-15
- ³Ì«áµn¿ý
- 2013-6-26
|
EXCEL ¬¡¶Ã¯SHEET1¸ê®Æ¤À¦Ü¤£¦P¬¡¶Ã¯
¥i§_¤£¥ÎVBA, ¥u¥Î¨ç¼Æ©Î¥¨¶°³B²z¤U¦C ?
(1)
½Ð°Ý¦³ÀɮפºSHEET1, ¤º¦³30¦Wû¤u¸ê®Æ (¬O±q¤H¨Æ¨t²Î¿é¥Xªº¸ê®Æ), ¤w©T©w¨C10 ROW¬°¤@Óû¤uªº¸ê®Æ, ¦p¦ó±N¤§¤@¦¸¹L, ¤À§OÀx¦s¦Ü30Ó¤£¦PªºEXCEL¿W¥ßÀÉ.
§YÀÉ®×A¬O³¯¤j¤åªº¸ê®Æ (¨Ó·½¬O¬¡¶Ã¯SHEET1 A1:Z10)
ÀÉ®×B¬O§õ¤pªáªº¸ê®Æ (¨Ó·½¬O¬¡¶Ã¯SHEET1 A11:Z21), ¦p¦¹Ãþ±À.
(2) ¤S¦p¦ó¥i¥H§Ö³t¬°¨CөΤ@¦¸¹L±N©Ò¦³¿W¥ßÀÉ®×:
2A)³]©w¬¡¶Ã¯¨¾Å@±K½X, ¤Î
2B) ³]©wÀɮ׶}±Ò±K½X?
¦hÁÂ! |
|
|
|
|
|
|
- ©«¤l
- 214
- ¥DÃD
- 74
- ºëµØ
- 0
- ¿n¤À
- 296
- ÂI¦W
- 0
- §@·~¨t²Î
- win7
- ³nÅ骩¥»
- office2007
- ¾\ŪÅv
- 20
- ©Ê§O
- ¨k
- ¨Ó¦Û
- hk
- µù¥U®É¶¡
- 2013-6-17
- ³Ì«áµn¿ý
- 2018-11-3
|
¦^´_ 1# mariabb
¿é¥X·s¤å¥ó¦W=A1.xlsm,A11.xlsm,A21.xlsm,A31...
workbook password=123456
workbook open password=123456
workbook Àx¦s¦b thisworkbook©Ò¦bfolder¨½
Sub CreatePrivateWB()
Do
Set R = Cells(1, 1).Offset(10 * p).Resize(10, 26)
A = R.Value
If WorksheetFunction.CountA(A) > 0 Then
R.Copy
Set Wb = Workbooks.Add
With Wb
Name = R.Cells(1).Address(False, False, xlA1)
Cells(1, 1).PasteSpecial
.Protect 123456
.SaveAs Filename:=ThisWorkbook.Path & "\" & Name & ".xlsm", _
FileFormat:=xlOpenXMLWorkbookMacroEnabled, Password:=123456
.Close True
End With
p = p + 1
Else
Exit Sub
End If
Loop
End Sub |
|
lmh
|
|
|
|
|
- ©«¤l
- 45
- ¥DÃD
- 1
- ºëµØ
- 0
- ¿n¤À
- 51
- ÂI¦W
- 0
- §@·~¨t²Î
- windows 7
- ³nÅ骩¥»
- office 2003
- ¾\ŪÅv
- 20
- µù¥U®É¶¡
- 2013-4-16
- ³Ì«áµn¿ý
- 2013-12-30
|
¨C¤@¬¡¶Ã¯¬O¤@ÓEXCEL¿W¥ßÀÉ- Sub SplitWorkbook()
- Dim ws As Worksheet
- Dim DisplayStatusBar As Boolean
- DisplayStatusBar = Application.DisplayStatusBar
- Application.DisplayStatusBar = True
- Application.ScreenUpdating = False
- Application.DisplayAlerts = False
- For Each ws In ThisWorkbook.Sheets
- Dim NewFileName As String
- Application.StatusBar = ThisWorkbook.Sheets.Count & ¡§ Remaining Sheets¡¨
- If ThisWorkbook.Sheets.Count <> 1 Then
- NewFileName = ThisWorkbook.Path & ¡§\¡¨ & ws.Name & ¡§.xlsm¡¨ ¡¥Macro _
- -Enabled
- ¡¥ NewFileName = ThisWorkbook.Path & ¡§\¡¨ & ws.Name & ¡§.xlsx¡¨ _
- ¡¥Not Macro-Enabled
- ws.Copy
- ActiveWorkbook.Sheets(1).Name = ¡§Sheet1¡¨
- ActiveWorkbook.SaveAs Filename:=NewFileName, _
- FileFormat:=xlOpenXMLWorkbookMacroEnabled
- ¡¥ ActiveWorkbook.SaveAs Filename:=NewFileName, _
- FileFormat:=xlOpenXMLWorkbook
- ActiveWorkbook.Close SaveChanges:=False
- Else
- NewFileName = ThisWorkbook.Path & ¡§\¡¨ & ws.Name & ¡§.xlsm¡¨
- ¡¥ NewFileName = ThisWorkbook.Path & ¡§\¡¨ & ws.Name & ¡§.xlsx¡¨
- ws.Name = ¡§Sheet1¡¨
- End If
- Next
- Application.DisplayAlerts = True
- Application.StatusBar = False
- Application.DisplayStatusBar = DisplayStatusBar
- Application.ScreenUpdating = True
- End Sub
½Æ»s¥N½X |
|
|
|
|
|
|
- ©«¤l
- 9
- ¥DÃD
- 4
- ºëµØ
- 0
- ¿n¤À
- 18
- ÂI¦W
- 0
- §@·~¨t²Î
- VISTA
- ³nÅ骩¥»
- office 2007
- ¾\ŪÅv
- 10
- µù¥U®É¶¡
- 2013-4-15
- ³Ì«áµn¿ý
- 2013-6-26
|
¨º»ò, ¥i§_½Ð±ÐVBA¦p¦ó°µ©O, §Ú²{¥¿¶}©l¾Ç²ß. |
|
|
|
|
|
|
- ©«¤l
- 605
- ¥DÃD
- 92
- ºëµØ
- 0
- ¿n¤À
- 648
- ÂI¦W
- 0
- §@·~¨t²Î
- windows
- ³nÅ骩¥»
- 7
- ¾\ŪÅv
- 50
- ©Ê§O
- ¨k
- ¨Ó¦Û
- macau
- µù¥U®É¶¡
- 2013-4-5
- ³Ì«áµn¿ý
- 2019-2-10
|
¦^´_ 1# mariabb
¤£¥ÎVBAµLªk°µ¨ì |
|
ss
|
|
|
|
|