myvalue

  1. V

    VBA Help - Inefficient Code

    I have this code I created that loops through lines of accounting data and moves offsetting lines to another sheet in the workbook called "Cleared." It works for the most part but after about 180 lines it starts to slow down and then almost comes to a complete stop. I created an absolute value...
  2. Trevor3007

    auto rename tab

    good day, i have the the following code:- Private Sub Workbook_Open()If MsgBox("Do You Need To Insert Name ?", vbYesNo + vbQuestion) = vbNo Then Exit Sub Dim myValue As Variant myValue = InputBox("Enter Name") Sheets("2").Range("D1").Value = Application.WorksheetFunction.Proper(myValue) End...
  3. L

    Transfering information from Excel to Word, having problems making the code work

    Dear all, so recently I have been trying to make Excel transfer information to Word and vice versa. The code below doesn't have a practical purpose beyond learning purposes. So first I tried this, which results in a subscript out of range error. I would think this would open the excel file and...
  4. A

    Input Box

    Hi looking for help with my input box macro below, I am looking to have the macro only allow certain numbers e.g. 10,20,30,40,50 etc but this doesn't work: Sub runQsheet() Dim myValue As Variant Do myValue = InputBox("Enter Fiscal Week Number", "Report Refresh", 1) 'cancel pressed...
  5. F

    VBA to select a chart from several possible charts.

    I have VBA, where a user can select one of 6 possible worksheets, as seen below: Sub Second_Half_Reports() Dim MyValue Dim i AsString 'MsgBoxprompt:="Continue to 2nd 6 Months of Reports?", Title:="Voc.Rehab. - Career Link" i =MsgBox("Continue to 2nd 6 Months of...
  6. F

    Data Search and hyperlink

    Hi I am writing a macro where the when the user press a commandbutton, the user will input the data he want to find and the macro will search the whole workbook(excluding sheet1) relating to what the user input. The found cell value will then be copied and paste on sheet1 A1 and which sheet it...
  7. skorpionkz

    [VBA] Variable from Names

    Hi guys, I have Name (let say myName) that I am adding value (let say myValue). This is not the range, I want it to hold the value itself (which is name of another workbook for later use in VBA). In the name manager myName shows correct value, but when in VBA I am trying to assign myName.value...
  8. B

    Copying Cells with a Partial String

    I have a macro where I'm trying to cut rows out of one sheet and place in another based on a partial data string in the cell. Data: <tbody> 1111-1000-8 1111-1001-8 1111-2000-8 1111-2000-8 1111-2001-8 </tbody> Code: Sub Macro1()' Dim myrange As Range Dim myvalue As String myvalue...
  9. J

    VBA Grouping Macro needing to be modified

    I found a macro that almost gets me what I need and was wondering if someone would help to modify. The macro I have is grouping column A and leaving the first row of each HCode ungrouped: What I need is to group Column A leaving the last (Total) row of each HCode ungrouped: Here's the...
  10. J

    VBA Grouping Macro needing to be modified

    I found a macro that almost gets me what I need and was wondering if someone would help to modify. The macro I have is grouping column A and leaving the first row of each HCode ungrouped. What I need is to group Column A leaving the last (Total) row of each HCode ungrouped: -- corrupted image...
  11. D

    Cells populated with automation show no value via SSMS

    I am using VBA to enforce the population of two cells in my worksheet. I check to see if there are values in the on_save event. If there is not a value I prompt for it with the following code: If Len(Range("M2").Value) = 0 Then myValue = InputBox("Please enter your valid Email...
  12. S

    Vba learning

    below is my code which stops at the red word and gives compile error as shown below. [CODE][Sub inputbox() Dim myvalue As Variant myvalue = inputbox("Give me some input") Range("a1").Value = myvalue End Sub /CODE] Compile error: Wrong number of arguments or invalid property assignment
  13. Trevor3007

    run additional code in vb & yes/no

    Hi, I have this code that creates a random a password into a range:- Sub autocode() Static IsRandomized As Boolean Dim i As Integer, PW1 As String Dim cell As Range, PW As String If Not IsRandomized Then Randomize: IsRandomized = True For Each cell In...
  14. L

    Exceeded Nest In If Function

    Hello first time poster. I have exceeded the nest limit for an IF function and I was wondering if someone could help me come up with a solution. I don't mind creating another sheet and then using the VLookup or if there is something better. I am trying to do this in VBA and the only input would...
  15. P

    VBA - Searching for repeat values, copying, pasting, & looping

    Hey Everyone, Got a question I'm hoping to get some help on. Below I have copied a small bit of my code. What I'm trying to do is search out a value from a msg box insertion (called "myValue"), find another value (called "Added:"), and copy the adjacent cell values between "myValue" and...
  16. J

    VBA Input Boxes

    Hello, I have the following code which starts with an input box that asks you to enter a period (which happens to be 4 digits long). If this is not in the list "Items" then it will ask you for it again. If this is entered correctly then it will take you to a 2nd input box which asks you for a...
  17. M

    Macro edit range to copy

    Hello everyone, need your help to edit the following macro: Sub x() Dim myValue As Variant myValue = InputBox("Give me some input") Dim rFind As Range, ws As Worksheet, wb1 As Workbook, wb2 As Workbook Dim RngCp As String RngCp = Rows("2:" & Range([A1]...
  18. M

    Paste in the first row with same value from other workbook

    Hello all, i'm really stuck on this one. I have the following code... Sub TesteSelect() Dim myValue As Variant myValue = InputBox("Give me some input") Application.ScreenUpdating = False Application.DisplayAlerts = False ChDir "L:\..." '1 Workbooks.OpenText Filename:= _...
  19. M

    Adapt codes

    I want to put this code Rows("2:" & Range([A1], ActiveSheet.UsedRange).Rows.Count - 2).Copy in workbook1, workbook1 will open several workbooks (six) with vba. How can i adapt that code to select the range from the other workbooks and past on workbook1.sheet(named with the name of the files...
  20. J

    Save workbook with Macros

    I am trying to copy a workbook and save it as a new file. The problem, using the code below, is that it references the macros in the new workbook back to the original. I need the macros copied along with the workbook. Can someone tell me if I am missing something or just going about it...

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