I suggest you associate random numbers with numbers 0-9999, then sort in the order of the random numbers. This will give those numbers in random order.
Simplest way would do this in a worksheet but you could do it with an array if you prefer (probably). Then load into your databse all at...
Try putting this in the worksheet module to make it run when column a is changed.
Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Column = 1 Then
CurRow = target.row ' Set by your code to whatever row the 'user is working on. . .
Worksheets("Sheet1").Range("B" & CurRow).Value...
Hi, ideas for this one are appreciated.
I have a worksheet with several images on it (gifs pasted onto the worksheet). When a userform is opened I would like a random one of these images to be used as the image on an image control on a userform.
Can easily select a random image from the...
Would anybody know a slick way to sort a collection or array into a random order?
The only method I can think of at the moment is to put the values into a worksheet, assign random numbers to the next column, sort and reload into the collection/array. Yuk
I think it is the opening, closing and saving of workbooks that takes the time, and I don't know if this can be sped up. Would be interested to know if anyone has a way...
This should help, change "mypath" to point to the directory. Not tested so it might need some tweaks.
Sub RemSpacesinA1()
Application.ScreenUpdating = False
Application.DisplayAlerts = False
Dim openwb As Workbook
Dim ws As Worksheet
Dim mypath As String
Dim ssf As Boolean
mypath = "C:\"...
Not sure if this can be done using XL2k.
Would like to have a stacked bar chart with a line as well. I am able to combine bar chart and line chart but not have stacked bars.
The stack bars will be the achieved volumes of business broken down into categories by month, and the line represents...
You could use VB Script
Paste this into notepad and save with a vbs extension.
When you run it it will open Excel.
Dim MyObj
Set MyObj=CreateObject("WScript.Shell")
MyObj.Run "Excel.exe"
This can be done with formatting very easily, just select the part of the cell you want to format and go to format cells as usual.
You can also have parts bold, different sized fonts or whatever you want in the same way.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.