Edit Form and update them in xlsheet
Hi Team,
Thanks for your continues help. I need your advices on couple of things:
1. In my previous thread (Progress bar help method not found) I have attached the spreadsheet and I would like to edit the Forms (ServerForm, NodeForm, AccountForm) and when I click on Done or OK button, it should ask for Save or Not.
When we click on save, it should be able to save the values in the specified column in the xlsheet.
To achieve this as initial step I made the properties of all text boxes Locked=False. Could you please guide me the next step?
2. Is it possible to display the Search results in a Form or in browser(IE/Mozilla) rather than in Target XLSheet?
Thanks,
Suresh.
Edit Form and update them in xlsheet
Hi MD,
Sorry for my late response. I went to Grand Canyon with my friends :beerchug:
Looks like editing the appropriate cell through Form is biggest challenge for me :( I have tried in couple of methods but was not able to acheive the target result.
Here is the methods I have Tried.
Method1:
1. I have changed "Locked=False" to every Text box in the form
2. I gave the Tag values to every Text Box (Like B1:B25 for Server Name Text Box, C1:C25 for Server Ip Addresses,...etc)
3. Embedded your code in the following way:
I have created a DONE Button and embedded your code in "DoneButton_Click" procedure
I am getting the following error while debugging the code:
Complier Error:
For Each Control variable Must be Variant or Object (Got the error at "For Each c In Controls")
Method2:
1. I have changed "Locked=False" to every Text box in the form
2. I gave the Tag values to every Text Box (Like B1:B25 for Server Name Text Box, C1:C25 for Server Ip Addresses,...etc)
Private Sub UserForm_Initialize()
Dim myControl As MSForms.Control
Dim myLabel As MSForms.Label
'add all the textboxes to collection of cFormTextBox
For Each myControl In Me.Controls
'if its a textbox
If TypeName(myControl) = "TextBox" Then
'instance a new custom class
Set ctlTXT = New cFormTextBox
'pass the form and control to the new class
ctlTXT.Init myControl, Me
colTXT.Add ctlTXT
End If
Next
End Sub
In Method2, when I am trying to update the Server IP address Field for a specific server, It is updating the New IP address for ALL Servers??? I am with no idea on what to do now:dunno :help . Could you please guide me?
Once I am done with this, Hopefully will not bug you guys atleast for a month: pray2: .
Here I am sending the sample file. Now I am testing for only ServerForm. Please have alook at ServerForm.
Thanks in advance,
Suresh
Edit Form and update them in xlsheet
Hi MD,
Your suspect was 200% correct. Few of our tags were not numbers and I have corrected the tags and now it is working perfectly :thumb Thanks somuch for your help.
I have one more quick help :help
Our existing form will edit/update the existing information(based on the first cell, server Name).
If we want to create a NEW server details with that form, how could we achieve?? Do we need to create a seperate form with the new tag values?
or is there any way to create a new server information with our existing form?
Just outof curious, How long you been working on VBA? Because I am wondering you are resolving the issues in minutes which I am unable to solve for days :(
Thanks in advance.
Suresh.
Edit Form and update them in xlsheet
Hi MD,
Thanks MD. Everything is working cool:thumb . Good to know that you are good at Access and VBA. Thank god I have a friend who is good at many technologies:beerchug: .
Sorry to keep this thread for long time even the issues are resolved with your help. I just got couple more questions in my mind.: pray2:
I need your help in couple more aspects.:help
1. Is there any way to update the Last update field(In Nodes table), whenever a record gets updated. This should happen automatically.
2. Is there any way to write a Macro to read stuff right into the tables(Nodes and UpdateList worksheets). Should have files that are comma delimited. (servername, nodename).
Macro would read in file. If matches it would read in data. If it doesn?t match a new record would be created in Nodes table.
Forexample:
We have 2 worksheets called Nodes, UpdateList.
When we ran the macro UpdateList Records need to compare with the Nodes Records.
If there is any NEW record in UpdateList, That record need to be added to Nodes tables.
If there is a Record in Nodes sheet but not in UpdateList, That record should be deleted from Nodes worksheet.
I dont know whether I have explained in good way or not. please give me some advices to achive this.
Thanks,
Suresh.
Solved: Edit Form and update them in xlsheet
Hi Team,
Thanks somuch for your help. I am going to close this thread, since the initial problem as I mentioned in the subject line is resolved. May be in couple of days, I will come up with clear picture of the updating xlsheet with new values. I will ask your help, If need anything from you guys.
My special thanks to MD, Gibbs and Rembo. :friends:
Thanks,
Suresh.