ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Profress Indicator (https://www.excelbanter.com/excel-discussion-misc-queries/173494-profress-indicator.html)

pgarcia

Profress Indicator
 
I have this bit of code but I'm having problems with it, could you take a
look and point me in the right direction? I can't seem to get the form to
update.
Thanks

Sub Test()
UserForm1.LabelProgress.Width = 0
UserForm1.Show
End Sub

Sub CMSFuel()

Dim PctDone As Single

With UserForm1
.FrameProgress.Caption = Format(PctDone, "0%")
.LabelProgress.Width = PctDone * (.FrameProgress.Width - 10)
DoEvents
End With

Application.ScreenUpdating = False
Application.StatusBar = "One moment please..."
Sheets("0017").Select
Range("D1").Select
ActiveCell.FormulaR1C1 = "=TEXT(RC[-2],""0000"")"
Range("D1").Select
Selection.AutoFill Destination:=Range("D1:D95")
Range("D1:D95").Select
Selection.Copy
Selection.PasteSpecial Paste:=xlValues, Operation:=xlNone, SkipBlanks:= _
False, Transpose:=False
Application.CutCopyMode = False
Range("D1:D95").Cut Destination:=Range("B1:B95")
Range("D1").Select
ActiveCell.FormulaR1C1 = "=CONCATENATE(RC[-3],RC[-2],"" "",RC[-1])"
Selection.AutoFill Destination:=Range("D1:D95")
Range("D1:D95").Select
Selection.Copy
Selection.PasteSpecial Paste:=xlValues, Operation:=xlNone, SkipBlanks:= _
False, Transpose:=False
Application.CutCopyMode = False
Columns("A:C").Select
Range("C1").Activate
Selection.Delete Shift:=xlToLeft
Range("A1").Select
ChDir "C:\Documents and Settings\autpbg1\Desktop\test cms"
ActiveWorkbook.SaveAs Filename:="C:\Documents and
Settings\autpbg1\Desktop\test cms\d0017ar.txt", _
FileFormat:=xlText, CreateBackup:=False
Sheets("In Put Tab").Select
MsgBox ("The update is now complete.")
Unload UserForm1
End Sub


FSt1

Profress Indicator
 
hi
what are you trying to do? Progress bar????

"pgarcia" wrote:

I have this bit of code but I'm having problems with it, could you take a
look and point me in the right direction? I can't seem to get the form to
update.
Thanks

Sub Test()
UserForm1.LabelProgress.Width = 0
UserForm1.Show
End Sub

Sub CMSFuel()

Dim PctDone As Single

With UserForm1
.FrameProgress.Caption = Format(PctDone, "0%")
.LabelProgress.Width = PctDone * (.FrameProgress.Width - 10)
DoEvents
End With

Application.ScreenUpdating = False
Application.StatusBar = "One moment please..."
Sheets("0017").Select
Range("D1").Select
ActiveCell.FormulaR1C1 = "=TEXT(RC[-2],""0000"")"
Range("D1").Select
Selection.AutoFill Destination:=Range("D1:D95")
Range("D1:D95").Select
Selection.Copy
Selection.PasteSpecial Paste:=xlValues, Operation:=xlNone, SkipBlanks:= _
False, Transpose:=False
Application.CutCopyMode = False
Range("D1:D95").Cut Destination:=Range("B1:B95")
Range("D1").Select
ActiveCell.FormulaR1C1 = "=CONCATENATE(RC[-3],RC[-2],"" "",RC[-1])"
Selection.AutoFill Destination:=Range("D1:D95")
Range("D1:D95").Select
Selection.Copy
Selection.PasteSpecial Paste:=xlValues, Operation:=xlNone, SkipBlanks:= _
False, Transpose:=False
Application.CutCopyMode = False
Columns("A:C").Select
Range("C1").Activate
Selection.Delete Shift:=xlToLeft
Range("A1").Select
ChDir "C:\Documents and Settings\autpbg1\Desktop\test cms"
ActiveWorkbook.SaveAs Filename:="C:\Documents and
Settings\autpbg1\Desktop\test cms\d0017ar.txt", _
FileFormat:=xlText, CreateBackup:=False
Sheets("In Put Tab").Select
MsgBox ("The update is now complete.")
Unload UserForm1
End Sub


pgarcia

Profress Indicator
 
Ya, there's not "edit" on this forms. It's also in the wrong place.

"FSt1" wrote:

hi
what are you trying to do? Progress bar????

"pgarcia" wrote:

I have this bit of code but I'm having problems with it, could you take a
look and point me in the right direction? I can't seem to get the form to
update.
Thanks

Sub Test()
UserForm1.LabelProgress.Width = 0
UserForm1.Show
End Sub

Sub CMSFuel()

Dim PctDone As Single

With UserForm1
.FrameProgress.Caption = Format(PctDone, "0%")
.LabelProgress.Width = PctDone * (.FrameProgress.Width - 10)
DoEvents
End With

Application.ScreenUpdating = False
Application.StatusBar = "One moment please..."
Sheets("0017").Select
Range("D1").Select
ActiveCell.FormulaR1C1 = "=TEXT(RC[-2],""0000"")"
Range("D1").Select
Selection.AutoFill Destination:=Range("D1:D95")
Range("D1:D95").Select
Selection.Copy
Selection.PasteSpecial Paste:=xlValues, Operation:=xlNone, SkipBlanks:= _
False, Transpose:=False
Application.CutCopyMode = False
Range("D1:D95").Cut Destination:=Range("B1:B95")
Range("D1").Select
ActiveCell.FormulaR1C1 = "=CONCATENATE(RC[-3],RC[-2],"" "",RC[-1])"
Selection.AutoFill Destination:=Range("D1:D95")
Range("D1:D95").Select
Selection.Copy
Selection.PasteSpecial Paste:=xlValues, Operation:=xlNone, SkipBlanks:= _
False, Transpose:=False
Application.CutCopyMode = False
Columns("A:C").Select
Range("C1").Activate
Selection.Delete Shift:=xlToLeft
Range("A1").Select
ChDir "C:\Documents and Settings\autpbg1\Desktop\test cms"
ActiveWorkbook.SaveAs Filename:="C:\Documents and
Settings\autpbg1\Desktop\test cms\d0017ar.txt", _
FileFormat:=xlText, CreateBackup:=False
Sheets("In Put Tab").Select
MsgBox ("The update is now complete.")
Unload UserForm1
End Sub



All times are GMT +1. The time now is 12:59 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com