Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Search results for query: *

  • Users: acron
  • Order by date
  1. acron

    Indirect Naming of Workbooks

    As far as I know the only way to apply a name to a workbook is to save it with the required name. [tab]ActiveWorkbook.SaveAs [A1] & ".xls" Or have I missed something ? A.C.
  2. acron

    VBA - Excel TabIndex?

    If you have a TextBox1 and TextBox2 the following code will Tab from TextBox1 to TextBox2 : Private Sub TextBox1_KeyDown(ByVal KeyCode As MSForms.ReturnInteger, _ ByVal Shift As Integer) If KeyCode = 9 Then TextBox2.Activate End Sub You can repeat the same idea...
  3. acron

    Find a sheet with code

    Something like : Sub FindSheet() On Error GoTo ErrHandler Sheets(InputBox("Enter Name of Sheet to Activate :")).Activate Exit Sub ErrHandler: MsgBox "Sheet not found" End Sub A.C.
  4. acron

    Remove Close Button From Excel Form

    You can disable the button with th e following code : Private Sub UserForm_QueryClose(Cancel As Integer, CloseMode As Integer) If CloseMode = 0 Then Cancel = True End Sub To actually remove the button (x) would require some API calls. A.C.
  5. acron

    Hide/Unhide formula bar?

    Application.DisplayFormulaBar = False To reverse just set to True A.C.
  6. acron

    Auto-Enable Macros at Startup in Excel

    If macros are disabled, the macro to enable macros would be disabled. If it was possible to enable macros by using code then there would be no security at all. What you need to do is to investigate the use of digital signatures. See the following MSDN aricle ...
  7. acron

    Changing colour of AutoShape

    Try the following code which should change the color of an AutoShape named "MyShape", based on the value in A1. [code] Private Sub Worksheet_Change(ByVal Target As Range) Application.EnableEvents = False With ActiveSheet.Shapes("MyShape").Fill.ForeColor Select...
  8. acron

    Using "tab" to move from control to control

    You can use the KeyDown event of the control to do what you want. For example if you have 2 Textboxes on your sheet, when you are in TextBox1 and hit th eTab key, the following code will activate TextBox2 : [code] Private Sub TextBox1_KeyDown( _ ByVal KeyCode As MSForms.ReturnInteger, _...
  9. acron

    Code to detect unprotected VBA project

    To delete code from a protected VBA project you would need the Password (or a Password cracker). None of the information or the link I provided would enable tampering with protected code. I can assure you that I would in no way aid and abet any attempt to 'crack' any code. Regards, A.C.
  10. acron

    from vba office XP to VB6

    VBA (MS Office) UserForms are not compatible with VB Forms. You will ned to rebuild the form from scratch in VB. A.C.
  11. acron

    Code to detect unprotected VBA project

    It is very easy to establish if any particular workbook is protected or not interactively by simply trying to acces the code. So why not make the same process simple via code ? I do not think cbdsolutions needs to explain to me why he is trying to do something. I have no reason to think he is...
  12. acron

    Code to detect unprotected VBA project

    < Well I was with xlbo before acron jumped the gun as in why? > I cannot see what the problem is. What gun ? A.C.
  13. acron

    Excel 2000 Enter &quot;x&quot; with the click of a mouse

    If a DoubleClick is acceptable you can use something like the following : Private Sub Worksheet_BeforeDoubleClick( _ ByVal Target As Range, Cancel As Boolean) If Not Intersect(Range(&quot;A1:F20&quot;), Target) Is Nothing Then If Target = &quot;x&quot; Then...
  14. acron

    Code to detect unprotected VBA project

    The following function should return True if a workbook's VBA code is protected : Function ProtectedCode(WB As Workbook) As Boolean ProtectedCode = WB.VBProject.Protection End Function You can use [tab]ActiveWorkbook.VBProject.Protection for the active workbook. You can...
  15. acron

    Cancel Cells

    The following will clear the contents from all rows except teh first. [tab]Range(&quot;2:65536&quot;).ClearContents A.C.
  16. acron

    Anyone like a challenge?

    Could you let us know what value is returned by : [tab]ActiveCell.Offset(b, 2).Value = GetLine To esatblish that just type Stop as the next line of code. A.C.
  17. acron

    How can I get the Caption of a Checkbox ?

    Just for the record the following should work with Form objects, Sub CycleThroughCheckboxes() Dim CB As Object For Each CB In ActiveSheet.DrawingObjects CBName = CB.Name 'OK CBLinkedCell = CB.LinkedCell 'OK CBCaption = CB.Characters.Text Call...
  18. acron

    Anyone like a challenge?

    Could you post the exact value that is being returned, or say waht format the dates are returned in. A.C.
  19. acron

    Is this easy, or a challenge for someone

    You can use m_objWorksheet.UsedRange (i.r omit CurrentRegion) to select the used range of the worksheet. However this will include blanks. Probably SpecialCells would be fast way to create teh range as in : Dim CellsUsed As Range, m_objWorksheet As Worksheet Set m_objWorksheet =...
  20. acron

    Cylecle all cells in worksheet

    Use Dim c As Range For Each c In Worksheets(&quot;Sheet1&quot;).Cells 'Procees Next There are 16,777,216 cells in each worksheet, so depending on what action you are performing it may be slow. A.C

Part and Inventory Search

Back
Top