public

  1. Y

    Reset Clear ClipBoard

    Hello everyone I have searched a lot and tried a lot of codes for clearing the clipboard and this is one of them Public Declare Function OpenClipboard Lib "user32" (ByVal hwnd As Long) As Long Public Declare Function EmptyClipboard Lib "user32" () As Long Public Declare Function CloseClipboard...
  2. kelly mort

    Re-Save and compress images from a folder

    Hello, So I have been trying to find a solution to my image compression issue for a while now and I came across this code in vb. Net I have no idea how to understand it. But I have the feeling it's closer to my need. I have a folder which contains these images of various sizes that I want to...
  3. L

    Userform Input as global variable that would be used in another module

    I am fairly new at VBA and have been working on this for the past couple of days. I am having trouble using the values submitted through a UserForm. I would like to use the values (rows, columns, x distance and y distance) in another module to set the number of loops needed to populate my data...
  4. M

    no value given for one or more required parameters on execute statement in vba

    Hi, i have "Run time error no value given for one or more required parameters" on execute statement in vba I am trying to connect Excel as database. i am going to execute update query from one excel workbook. Public con_daily As Connection Public con_ele As Connection Public com_daily As...
  5. C

    Save and Close Excel file by ScheduleTask

    Im having a hard time with VBA editor, it shows me some errors sometimes, and sometimes don't. Mostly, I got error " Can't find project or library" and what i had done so far was deleting the error file and tried to recover the previous version of the file before. I could find any missing items...
  6. W

    How do I use VBA to delete only certain conditional formatting rules applying to a range?

    I am using VBA code to add a conditional formatting rule to a dynamically selected column of cells in a worksheet (specified by SelectedCol variable). This is working satisfactorily (see below Code Extract). I, however, would also like to use VBA code to remove this conditional formatting from...
  7. P

    Conditional Formatting - To color following Mon as Public Holiday if Public Holiday falls on Sun

    Hi, I have a workbook with 3 worksheets - 1st worksheet shows a yearly calendar, 2nd worksheet shows a list of course schedule, i.e. course name, course duration, start and end date, 3rd worksheet shows Public Holiday of that year. Help needed to set a rule using conditional formatting to...
  8. V

    Read all Excel from a specific folder and paste them in 1 Excel

    Hi to all. I want to read all excel files from a specific folder and paste them in 1. The point is After the first excel file i want from the rest to make a range excludind the headers. (the first 3 lines) I try this one where work fine for the first one but I'm unable to create a range for...
  9. L

    How do I correctly use GetClipboardData to retrieve what is currently saved in the Clipboard?

    Dear all, I have the following code: Public Declare Function GetClipboardData Lib "user32" (CF_UNICODETEXT) As Long Public Declare Function OpenClipboard Lib "user32" (ByVal hwnd As Long) As Long Public Declare Function EmptyClipboard Lib "user32" () As Long Public Declare Function...
  10. N

    How can i control the with class module respective textboxes with keypress and change event ?

    Hello I would like 1. txtFrm5 to trigger the KeyPress Event with numerical values only 2. txtFrm7 to Automatically calculate discount of 10% in respective textbox Change event i.e txtFrm7.value = txtFrm5.Value - (txtFrm5.Value*10/100) 3.TxtFrm7 should KeyAscii = 0 so no one enters the data...
  11. D

    VBA Clear Ribbon Edit Box by Button

    Hi, Is there a way to use a button to clear an Editbox on a Ribbon? Code Below... XML: <group id="TestTab" label="My Testing Tab"> <checkBox id="CB1" label="Check Box Test" onAction="onActionCheck" getPressed="getPressedCheck" /> <editBox id="FBox" label="Find" onChange="onChangeCheck"...
  12. N

    Wrong Display in Worksheet Cells through ClassModule of Comman AllTextBoxes_change Event

    Hello There is wrong Display in Worksheet Cells through ClassModule of Comman AllTextBoxes_change Event The range is from D2 to E25 . Want common change event for textboxes when typed in textboxes should change simultaneoulsy in rescpective cells of columns D and E. and when Next button clicked...
  13. C

    Making a Public variable work as it should

    I'm trying to use this as a Public or Global variable colnum = Round((Date - DateValue("12/20/2017")) / 7, 0) I did this: Insert -> Module: Public colnum As Integer Function UpdateCorrectColumn() As Integer colnum = Round((Date - DateValue("12/20/2017")) / 7, 0) End Function Result: Run...
  14. P

    Need a better understanding about Public Variables

    I am trying to get a better understanding how to declare Public variables and call them in various subs (mainly Private Subs). I am using the message box to test my code. O.K. so just below the Option Explicit and above a Private Sub, I declared a Public variable. Option Explicit Public...
  15. M

    Macro stops after 38 hours, is this a feature?

    Hi, We have an SQL query that uses a stored procedure on our database. For some reason it keeps going into error every few days. I made the below to refresh the query and try to detect the time for the break, however, coming in this morning to check it, it has errored (msgbox displayed) after...
  16. J

    Best way to declare variables for use in all modules?

    Hi, As title, I'm unsure of the correct way to do this as I've seen a few ways. On workbook open ? Public / Const? Example: myVar1 = Sheets("Sheet1").Range("A1").value How can I use myVar1 in all macros without any further declaration Any info appreciated
  17. G

    Add condition to Networkdays formula

    The formula I’ve been successfully using to determine the number of weekend days and public holidays of a project, is: =M13-NETWORKDAYS(K13,L13,'2018 Public holidays'!$C$1:$C$11) (M13 is the total number of days between K13, the start date and L13 the end date, '2018 Public holidays'!$C$1:$C$11...
  18. D

    VBA Macro for filtering on multiple set criteria

    I'm using the code below which is assigned to a button to filter based on a list of criteria. I'm getting an error when running and I can't see my problem:- Public Sub cmdLiveJobs_Click() ActiveSheet.ListObjects(1).AutoFilter.ShowAllData Application.ScreenUpdating = False...
  19. R

    Passing worksheet to a public property of a userform

    I have a userform which when I click on a label launches another userform. On this second userform I want to pass data from a worksheet through a public property. I have done this before but it does not work in this example and I haven't the foggiest why not? *I click on label named ICPSOLIDS...
  20. R

    accessing variant after macro has ended

    I have a public variable declared in a Module, that's triggered by worksheet change event; My public variable ceases to exist after the Module subroutine completes. How do I preserve a Public variable in memory, for use later on? Is there a way? Basically want to be able to retrieve that...

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top