Re: Sort by cell value before extracting to text file.
Forgot to add that the user will input the value for Sequence Column (E). Will try the suggested code. Thanks!
Re: Sort by cell value before extracting to text file.
Forgot to add that the user will input the value for Sequence Column (E). Will try the suggested code. Thanks!
Re: Sort by cell value before extracting to text file.
Hi Stephen,
I have commented it so the program would run, anyway attached is the sample workbook.
I have updated the sort range into
Range("A2:F2").Select
Selection.Sort Key1:=Range("F2"), Order1:=xlAscending, Header:=xlYes, _
OrderCustom:=1, MatchCase:=False, Orientation:=xlTopToBottom, _
DataOption1:=xlSortNormal
still encountering the problem.
Mot
Hi,
I am trying to make a Generic Script Maker, and would like to sort the scripts in ascending order by the Sequence column. ( So basically numerical values are to be inserted in Sequence. I am encountering "Select Method of class Range Failed." when using the
Range("A1:D1").Select Selection.Sort Key1:=Range("E2"), Order1:=xlAscending, Header:=xlYes, _
OrderCustom:=1, MatchCase:=False, Orientation:=xlTopToBottom, _
DataOption1:=xlSortNormal
Attached also is the Workbook. forum.ozgrid.com/index.php?attachment/70016/
Any help is appreciated.
Regards,
Mot
Re: Creating Textbox when a checkbox is checked
Yes, i figured that one out when i have posted it.
Attached is the workbook sample.
Thanks!
Hi,
I am having trouble on finding a solution on how to create a textbox when a checkbox is checked.
Here is my code:
On Sheet Browse:
With ActiveSheet.TextBoxes.Add(Cells(i + 1, 5).Left, Cells(i + 1, 5).Top, Cells(i + 1, 5).Width, Cells(i + 1, 5).Height)
.Name = "Textbox_" & i
.Visible = False
End With
On Sheet Generate:
'check if the current cell has data in it
If Cells(i + 1, 3) <> "" Then
'checkbox validation
For Each chk In ActiveSheet.CheckBoxes
If chk.Value = True Then
With ActiveSheet.TextBoxes.Visible = True
End With
If Textbox_i = vbNullString Then
'write the data to the file
item = item & "@" & Me.Server.Value & Cells(i + 1, 3) & ";" & Chr(10)
End If
Else
item2 = item & "@" & Cells(i + 1, 3) & Chr(10)
End If
i = i + 1
Next
Else
'if the last row has been reached exit the loop
flag = False
End If
Display More
When I tried running the code the result is:
[ATTACH=CONFIG]69988[/ATTACH]
The Textbox is not created nor the visible is True. (Sequence Column).
Any help is appreciated!
Thanks!
Mot