Search:

Type: Posts; User: Jaafar Tribak; Keyword(s):

Page 1 of 6 1 2 3 4

Search: Search took 0.34 seconds.

  1. Replies
    5
    Views
    32

    Re: VBA Loop every 200 milliseconds

    You could use the smoother method with the SetTimer API instead of with DoEvents\Sleep.

    Make the Refresh Macro Public (So it can be seen by the Timer Callback ) and put the following code In a...
  2. Replies
    5
    Views
    32

    Re: VBA Loop every 200 milliseconds

    Hi,

    "... but I am having trouble" is not enough info... Have you tried placing the Refresh Macro in a Do DoEvents Loop ? What hapeens exactly ?
  3. Re: Change Events with multiple instances of Excel

    Hi,

    Does that mean each sperate instance of excel has its own copy of the workbook ? and if so, does that mean the workbook is opened as Read Only ?
    Regards.
  4. Re: Preventing copy/move sheet INTO main workbook from outside workbook

    If you can't protect the workbook then you may want to try the following vba workaround which should prevent the user from copying/moving sheet(s) coming from other workbooks into the main workbook...
  5. Re: Autosave Macro when doc is not read only

    If Not ThisWorkbook.ReadOnly Then ...> Run Your AutoSave Macro Here
  6. Re: Cool RefEdit Alternative - (Made with a standard TextBox !)

    I tested the code on a similar system today (ie: Office 2016 32-bit Windows 10 64-bit ) and I didn't experience the issue you described regarding the form blanking out.

    Try the following new...
  7. Re: Cool RefEdit Alternative - (Made with a standard TextBox !)

    Hi wsDAH,

    Thanks for spotting those limitations and letting me know .

    1- The Shift + Arrow issue is solved by displaying the userform as Modeless (Couldn't make it work with Modal forms)
    2-...
  8. Replies
    5
    Views
    67

    Re: PutInClipboard Office 365

    Another clipboard tool that might work :

    Function SetClipBoardText(ByVal Text As Variant) As Boolean
    SetClipBoardText = CreateObject("htmlfile").ParentWindow.ClipboardData.SetData("Text",...
  9. Re: Print UserForm with Height of 2500 onto either several pages or squeezed onto 1 page.

    Correction in API declarations :

    Updated workbook example.


    #If VBA7 Then
    #If Win64 Then
    Private Declare PtrSafe Function GetWindowLong Lib "user32" Alias "GetWindowLongPtrA"...
  10. Re: Print UserForm with Height of 2500 onto either several pages or squeezed onto 1 page.

    Back to this thread.

    The code in post #3 doesn't seem to work at least on my excel 2016 64bit... I have rewritten the entire code and hopefully it should now work as expected. This is not an...
  11. Replies
    8
    Views
    233

    Re: Renaming an Active Workbook

    By Active Workbook , are you referring to the current workbook that is actually running the macro. In other words "ThisWorkbook" ?
  12. Re: Hide tabs and ribbon in Excel with VBA

    If you mean Auto-Hiding then


    Sub AutoHideRibbon()
    Application.CommandBars.ExecuteMso "HideRibbon"
    End Sub
  13. Re: Run macro after the enter key is pushed on specific cell

    What you want is actually trickier than it looks at first sight so you will need to resort to the windows api.

    Place this code in the ThisWorkbook module:

    The code assumes the Cell is A3 in...
  14. Re: Hide tabs and ribbon in Excel with VBA

    One way :

    Sub ShowRibbon(ByVal Show As Boolean)
    Application.ExecuteExcel4Macro "Show.ToolBar(""Ribbon""," & Show & ")"
    End Sub

    Then to hide it :

    Sub Test()
    Call ShowRibbon(False)
  15. Re: How to find where a named range is being used for data validation or as a rowsource?

    As fa as I can tell , not unless you iterate all the cells with data validation and\or the userform listboxes.
  16. Re: Toggle Zoom and Minimize and Maximize Ribbon

    Sub ribb_zoom()

    If ActiveWindow.Zoom <> 50 Then
    CommandBars.ExecuteMso "MinimizeRibbon"
    ActiveWindow.Zoom = 50
    ElseIf ActiveWindow.Zoom = 50 Then
    ...
  17. Replies
    3
    Views
    134

    Re: Lock all the controls in a userform

    Yes or just skip the labels in your code.
  18. Re: Microsoft Print to PDF Suppress "printing" Dialogue

    Hi,

    You could try something like this :

    Sub ConnectComAddIns(ByVal Connect As Boolean)

    Dim oCom As COMAddIn

    If Connect Then
    For Each oCom In Application.COMAddIns
  19. Re: Class for Zooming on images (Picture Shapes) displayed on worksheets.

    Hi Kelly,

    Glad you liked it and thanks for the feedback.

    The code should be easily adaptable for specific requirements.

    Regards.
  20. Class for Zooming on images (Picture Shapes) displayed on worksheets.

    Hi all,

    I thought I would post here this vba code, which as the title says , it allows zooming In\Out on worksheet images.

    I was prompted to write the code by a question asked recently here...
  21. Replies
    34
    Views
    19,633

    Re: ComboBox Scroll with Mouse wheel

    Just define a module level Const to set the number of lines per scroll and post WM_LBUTTONDOWN\WM_LBUTTONDOWN that number of times

    I have updated the workbook example


    Changes in red :

    ...
  22. Re: Zoom in on an image (picture) displayed in workbook

    Hi Andrew,

    I remember starting to write some code to zoom in\out on worksheet images sometime ago, but never finished the project.

    Are you wanting to zoom the images just by using the mouse...
  23. Re: Microsoft Print to PDF Suppress "printing" Dialogue

    Glad to have helped and thank you for the feedback.

    Regards.
  24. Re: How to disable Page View buttons (Normal, Page Layout, Page Break View) next to Zoom on status bar

    Interesting question.

    Is there a way of displaying the statusbar right-click context menu via vba ?

    Something similar to CommandBars("Cell").showPopUp

    If there is a way , I guess we could...
  25. Re: Microsoft Print to PDF Suppress "printing" Dialogue

    Hi Davavo,

    As I said, I think the way you wrote the code is the reason the screen jumps around while the code is runnig ... I suggest you read on how to write code without the need to activate...
Results 1 to 25 of 150
Page 1 of 6 1 2 3 4