Jump to content

Ilounah

Active Members
  • Posts

    93
  • Joined

  • Last visited

Everything posted by Ilounah

  1. Can an AUTOIT program automatically move newly saved files from the Desktop to a specific folder to avoid dumping on the Desktop, while leaving old applications and necessary folder icon links?
  2. Hi 😜 Hello, when I incorporate this code as an add-in within Excel, the data doesn't transfer to cells B12, B14, and B16 as expected. However, when I place the code in a module within the workbook itself, it works correctly. 1. Prompt the user to select an Excel file using the file dialog box. 2. Open the selected Excel file. 3. Retrieve the file location, file name, and the name of the first sheet in the Excel file. 4. Place this information in specific cells of a worksheet (Sheet3 using codename). 5. Close the selected workbook and quit Excel. 6. Display a message box informing the user that the process is complete. Thank you 🙏 Sub SelectExcelFile_() Dim selectedFile As Variant Dim fileLocation As String Dim excelApp As Object Dim Workbook As Object ' Open the file dialog box With Application.FileDialog(msoFileDialogFilePicker) .AllowMultiSelect = False .Title = "Select an Excel File" ' Show only Excel files in the dialog box .Filters.Clear .Filters.Add "Excel Files", "*.xls; *.xlsx; *.xlsm" If .Show = -1 Then ' User clicked OK ' Get the selected file path selectedFile = .SelectedItems(1) ' Create an instance of Excel and open the selected file Set excelApp = CreateObject("Excel.Application") Set Workbook = excelApp.Workbooks.Open(selectedFile) ' Get the file location fileLocation = Left(selectedFile, InStrRev(selectedFile, "\") - 1) ' Place the file location, file name, and sheet name in cells B12, B14, and B16 respectively Sheet3.Range("B12").Value = fileLocation Sheet3.Range("B14").Value = Workbook.Name Sheet3.Range("B16").Value = Workbook.Sheets(1).Name ' Close the selected workbook and quit Excel Workbook.Close excelApp.Quit ' Clean up the objects Set Workbook = Nothing Set excelApp = Nothing MsgBox "Done, Updating File Location.." & vbCrLf & vbCrLf & "Please Open the file:" & vbCrLf & Sheet3.Range("B14").Value, vbInformation, "Successful _path Folder Location." End If End With End Sub
  3. Hello @ioa747 The problem is C6,C7,C8 etc does not have a value like C5 so i cannot use Vlookup withou a lookup value, if im gonna put value on c6 on wards it will take my time due to more employees 😅
  4. Im using a Vlookup on another sheet to fetch the data of Time entry but only works on row 5, because I use C5 as lookup_value in Vlookup. Any suggestion how can i fetch row6 on wards using c5 as lookup_value? Thanks 😁
  5. Thank you Guy's, It works now, this is just a temporary solution and I have 10 employees and they were not so High skill on computer. If Not BitAND(WinGetState("[CLASS:MozillaWindowClass]"), 32) Then ;If winsow is minimized WinSetState("[CLASS:MozillaWindowClass]", "", @SW_MAXIMIZE) EndIf Im adding this one so if they will try to restore down or change sa size. And I wish they dont change the Zoom Scale 😅
  6. Good Day, I'm trying to Cover button 0 and X with a GUI if items are already sent (Black fonts gray background) to the counter so no one can void there product, and unlock (Gui Delete) if the item was not yet sent (Green font items) unsent orders can be deleted. The problem is why my code is deleting Gui Delete even the condition is exist. Sorry for my Bad english, I attached video how it works. #include <MsgBoxConstants.au3> #include <GuiConstants.au3> Opt("PixelCoordMode", 2) While 1 Local $color = "0x6EC89B" ; the color you are looking for (green) Local $result = PixelSearch(0, 137, 1, 465, 0xE8E9F1, 0) If Not @error And IsArray($result) Then $hGui = GUICreate("Disabled", 180, 60, 350, 907, $DS_MODALFRAME) GUISetState() WinSetOnTop($hGui, "", 1) WinActivate($hGui) Do Sleep(1000) ; wait 1 second before checking again Until Not $result Else GUIDelete() EndIf WEnd
  7. @water Thank you it code works Perfectly with little tweaks solved.
  8. Im using a simple script that If WinGetTitle "Inbox" exist then simple login script will run. Please guide me how to change Outlook view to Sent items Folder if User cancel the Login script. Im using MouseClick, can you share other way? Sorry for my Bad English 😅
  9. Hello @JLogan3o13 😀 , reading the html with javascript i can't browse some example how to do it 🤔
  10. Hello there 😉 I'm stuck google is not helping me, I need a little help form you guys.. This is the scenario if any of Hongkong1, Hongkong2 and Hongkong3 value is greater than "0" then Noodle value is equal to "1", ill be using this on our Daily Inventory 😓 <!DOCTYPE html> <html> <body> <h2>HTML Forms</h2> <form action="/action_page.php"> NOODLES: <input type="text" name="Category" value="" size="2"> <br> <br> Hongkong1: <input type="text" name="Hongkong1" value="" size="2"> <br> Hongkong2: <input type="text" name="Hongkong2" value="" size="2"> <br> Hongkong3: <input type="text" name="Hongkong3" value="" size="2"> <br><br> <input type="submit" value="Submit"> </form> </body> </html> Any Idea?, Thank you.. 😘
  11. @TheDcoder and @FrancescoDiMuro Thanks for help , I will try this suggestion. I will reply soon as I got Progress Sorry for my Bad English.
  12. Hello Guys Im just starting to learn #include <ButtonConstants.au3> #include <EditConstants.au3> #include <GUIConstantsEx.au3> #include <StaticConstants.au3> #include <WindowsConstants.au3> #Region ### START Koda GUI section ### Form=C:\Users\MPC\Desktop\STOCK REQUEST FORM 2019\Form1.kxf $Form1 = GUICreate("Form1", 229, 224, 206, 184) $Label1 = GUICtrlCreateLabel("DIMSUM CATEGORY", 8, 8, 110, 17) $Label2 = GUICtrlCreateLabel("SOMAI", 8, 56, 137, 17, $WS_BORDER) $Label3 = GUICtrlCreateLabel("WANTON", 8, 80, 137, 17, $WS_BORDER) $Label4 = GUICtrlCreateLabel("SHARKS FIN", 8, 104, 137, 17, $WS_BORDER) $Label5 = GUICtrlCreateLabel("CHICKEN FEET", 8, 128, 137, 17, $WS_BORDER) $Label6 = GUICtrlCreateLabel("ITEM DESCRIPTION", 8, 32, 106, 17) $Label7 = GUICtrlCreateLabel("REQUEST", 160, 32, 56, 17) GUICtrlCreateInput("", 160, 56, 57, 21, 0, 0) GUICtrlSetBkColor(-1, 0xB9D1EA) GUICtrlCreateInput("", 160, 80, 57, 21, 0, 0) GUICtrlSetBkColor(-1, 0xB9D1EA) GUICtrlCreateInput("", 160, 104, 57, 21, 0, 0) GUICtrlSetBkColor(-1, 0xB9D1EA) GUICtrlCreateInput("", 160, 128, 57, 21, 0, 0) GUICtrlSetBkColor(-1, 0xB9D1EA) $Button1 = GUICtrlCreateButton("PREVIEW", 160, 192, 60, 25) $Button2 = GUICtrlCreateButton("RESET", 106, 192, 50, 25) GUISetState(@SW_SHOW) #EndRegion ### END Koda GUI section ### While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit EndSwitch WEnd planning to make a simple stock request after request are done, if they click preview all 0 or blank request item will be remove and it will only display item with a request value after display ill make a button to save it as a pdf file, Is this possible in autoit? can you lead me what should I need to learn.
  13. Ilounah

    HTML FORM

    Thanks @TheDcoder , God Bless
  14. Hello, You want to use Outlook and attach the Excel file using AutoIT?
  15. Ilounah

    HTML FORM

    Thank's @TheDcoder (Link Bookmark) P.S What do noodles have to do with Hong Kong or Shanghai? - Noodles is a Item Category, I have a Stock Request Form that I made in Excel vba and I wan't to level it up using Database so I can easily do CRUD ( create, request, update and delete) on my forms, anyway flows goes like this see attach file (Default.png) if Siopao Category has no request items before I sent it to the Database, form will sort and remove all no request item (see attach Remove.png). and I don't have any idea how to make Item Category remove or remain if items has a value or not. Sorry for my Bad English
  16. Ilounah

    HTML FORM

    Hello Good Day Guys, I don't know how to make it work can you please share some tips or path me on the right way. I'm Planning to create a form in html with a condition, if Hongkong, Shanghai and Empress textbox value is empty then put Noodles textbox value to 0, else 1.
  17. I see the problem causing not to run my vba, because of 64 bit my code runs without problem in 32 bit need to tweak conditions to run both 32 and 64 bit. And if they have 2 installed different excel like 2007 and 2013 there will be a problem running my vba code. Solved. Closed.
  18. Ok, i ll IM him if antivirus blocking it to run.
  19. It works fine on my Excel 2007, but after I Emailed My Area Manager he told me after he Enable Macro Security nothing happen's, can someone test this to run on Excel 2016? My AM can't provide me more information Thank You in Advance, Please see attachment. <snip>
  20. My Inventory Form is working now, Thanks for new ideas
  21. @Surya, Sorry I was referring to vba code, I think this code is for Autoit
  22. I Don't know if this is possible, Can I use Cell Value to replace the name to Call Macro. ex. Call Range("B12").value ?
  23. Hello Guys Can you lead me how to simplified this? Thanks, Sub LoadData() Application.ScreenUpdating = False Sleep 2000 Application.StatusBar = "CreateData" If Worksheets("K-PMIXc").Range("C12").Value = "Calc01" Then Call Calc01 End If If Worksheets("K-PMIXc").Range("C12").Value = "Calc02" Then Call Calc02 End If If Worksheets("K-PMIXc").Range("C12").Value = "Calc03" Then Call Calc03 End If If Worksheets("K-PMIXc").Range("C12").Value = "Calc04" Then Call Calc04 End If If Worksheets("K-PMIXc").Range("C12").Value = "Calc05" Then Call Calc05 End If If Worksheets("K-PMIXc").Range("C12").Value = "Calc06" Then Call Calc06 End If If Worksheets("K-PMIXc").Range("C12").Value = "Calc07" Then Call Calc07 End If If Worksheets("K-PMIXc").Range("C12").Value = "Calc08" Then Call Calc08 End If If Worksheets("K-PMIXc").Range("C12").Value = "Calc09" Then Call Calc09 End If If Worksheets("K-PMIXc").Range("C12").Value = "Calc10" Then Call Calc10 End If If Worksheets("K-PMIXc").Range("C12").Value = "Calc11" Then Call Calc11 End If If Worksheets("K-PMIXc").Range("C12").Value = "Calc12" Then Call Calc12 End If If Worksheets("K-PMIXc").Range("C12").Value = "Calc13" Then Call Calc13 End If If Worksheets("K-PMIXc").Range("C12").Value = "Calc14" Then Call Calc14 End If If Worksheets("K-PMIXc").Range("C12").Value = "Calc15" Then Call Calc15 End If If Worksheets("K-PMIXc").Range("C12").Value = "Calc16" Then Call Calc16 End If If Worksheets("K-PMIXc").Range("C12").Value = "Calc17" Then Call Calc17 End If If Worksheets("K-PMIXc").Range("C12").Value = "Calc18" Then Call Calc18 End If If Worksheets("K-PMIXc").Range("C12").Value = "Calc19" Then Call Calc19 End If If Worksheets("K-PMIXc").Range("C12").Value = "Calc20" Then Call Calc20 End If If Worksheets("K-PMIXc").Range("C12").Value = "Calc21" Then Call Calc21 End If If Worksheets("K-PMIXc").Range("C12").Value = "Calc22" Then Call Calc22 End If If Worksheets("K-PMIXc").Range("C12").Value = "Calc23" Then Call Calc23 End If If Worksheets("K-PMIXc").Range("C12").Value = "Calc24" Then Call Calc24 End If If Worksheets("K-PMIXc").Range("C12").Value = "Calc25" Then Call Calc25 End If If Worksheets("K-PMIXc").Range("C12").Value = "Calc26" Then Call Calc26 End If If Worksheets("K-PMIXc").Range("C12").Value = "Calc27" Then Call Calc27 End If If Worksheets("K-PMIXc").Range("C12").Value = "Calc28" Then Call Calc28 End If If Worksheets("K-PMIXc").Range("C12").Value = "Calc29" Then Call Calc29 End If If Worksheets("K-PMIXc").Range("C12").Value = "Calc30" Then Call Calc30 End If If Worksheets("K-PMIXc").Range("C12").Value = "Calc31" Then Call Calc31 End If Application.ScreenUpdating = True End Sub
  24. Thank You Again Sir @water, Data for my vlookup is now set Sub CalculatePmix() Dim filename As String With Application.FileDialog(3) .AllowMultiSelect = False .Show If .SelectedItems.Count = 0 Then MsgBox "No file selected." Else filename = .SelectedItems(1) UserForm1.TextBox2.Value = Dir(.SelectedItems(1)) UserForm1.TextBox3.Value = Replace(UserForm1.TextBox2.Text, ".csv", "") UserForm1.TextBox4.Value = Left(filename, InStrRev(filename, "\")) Application.ScreenUpdating = False Workbooks.Open (filename) UserForm1.TextBox5.Value = Sheets(UserForm1.TextBox3.Value).Range("A5").Value Workbooks(UserForm1.TextBox2.Value).Close SaveChanges:=False Application.ScreenUpdating = True UserForm1.TextBox6.Value = Format(CDate(UserForm1.TextBox5.Text), "DD") End If End With End Sub
×
×
  • Create New...